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) => {
|
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)) close(id);
|
if (logs.find((l) => l.id === id)) return;
|
||||||
Promise.resolve().then(() => {
|
logs.push({
|
||||||
logs.push({
|
id: id,
|
||||||
id: id,
|
script: script,
|
||||||
script: script,
|
});
|
||||||
});
|
rerender();
|
||||||
rerender();
|
|
||||||
})
|
|
||||||
}),
|
}),
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user