dont double log

This commit is contained in:
Olivier Gagnon 2021-10-29 13:09:58 -04:00
parent d99d3fc222
commit f99c3fd0cd

@ -27,6 +27,7 @@ export function LogBoxManager(): React.ReactElement {
() => () =>
LogBoxEvents.subscribe((script: RunningScript) => { LogBoxEvents.subscribe((script: RunningScript) => {
const id = script.server + "-" + script.filename + script.args.map((x: any): string => `${x}`).join("-"); const id = script.server + "-" + script.filename + script.args.map((x: any): string => `${x}`).join("-");
if (logs.find((l) => l.id === id)) return;
setLogs((old) => { setLogs((old) => {
return [ return [
...old, ...old,