mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-01 00:10:12 +01:00
Fix New Query view not opening at all
The Edit Query effect broke when view wasn't present somewhere
This commit is contained in:
parent
20b8ab9baa
commit
a4cd8257e2
@ -102,9 +102,9 @@ const QueryOptionsCard = () => {
|
|||||||
}, [setFromTime, setFromDate, setToTime, setToDate]);
|
}, [setFromTime, setFromDate, setToTime, setToDate]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!options || !result) return;
|
if (!options?.view || !result?.view) return;
|
||||||
|
|
||||||
setSelectedServers(result.view.servers.map(server => options.view.servers.findIndex(s => s.serverUUID === server.serverUUID)).filter(i => i !== -1))
|
setSelectedServers(result.view.servers?.map(server => options.view.servers?.findIndex(s => s.serverUUID === server.serverUUID))?.filter(i => i !== -1) || [])
|
||||||
|
|
||||||
setFromDate(result.view.afterDate);
|
setFromDate(result.view.afterDate);
|
||||||
setFromTime(result.view.afterTime);
|
setFromTime(result.view.afterTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user