mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 22:22:26 +01:00
Merge pull request #2671 from gianfun/fix_ns_tail_behavior
Fix ns.tail() behaviour for multiple calls
This commit is contained in:
commit
1d83247f8d
@ -40,14 +40,12 @@ export function LogBoxManager(): React.ReactElement {
|
||||
() =>
|
||||
LogBoxEvents.subscribe((script: RunningScript) => {
|
||||
const id = script.server + "-" + script.filename + script.args.map((x: any): string => `${x}`).join("-");
|
||||
if (logs.find((l) => l.id === id)) close(id);
|
||||
Promise.resolve().then(() => {
|
||||
logs.push({
|
||||
id: id,
|
||||
script: script,
|
||||
});
|
||||
rerender();
|
||||
})
|
||||
if (logs.find((l) => l.id === id)) return;
|
||||
logs.push({
|
||||
id: id,
|
||||
script: script,
|
||||
});
|
||||
rerender();
|
||||
}),
|
||||
[],
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user