mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Fix LogConsole re-requesting logs
Turns out objects in the second argument to useEffect is compared by Object.is(), this means if the array containing the instances or slaves to show logs for get re-created during an update the LogConsole component would send a new request for the logs. Fix by converting the slave_ids and instance_ids arrays into strings before passing them on to useEffect.
This commit is contained in:
1 parent
285d71e13d
commit
200ccf8e06
1 file changed
+1
-1
@@ -94,7 +94,7 @@ export default function LogConsole(props) {
|
||||
return () => {
|
||||
control.offLog(logFilter, logHandler);
|
||||
};
|
||||
}, [props.all, props.master, props.slaves, props.instances]);
|
||||
}, [props.all, props.master, (props.slaves || []).join(), (props.instances || []).join()]);
|
||||
|
||||
return <>
|
||||
<Paragraph code className="instance-console">
|
||||
|
||||
Reference in new issue
Block a user