fix: append large parser collections safely
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import { BinaryReader } from '../binary/BinaryReader.js';
|
||||
import { readGuid } from '../binary/guid.js';
|
||||
import { appendItems } from '../model/append.js';
|
||||
import type { ParserDiagnostic } from '../model/diagnostics.js';
|
||||
import { parseDesktopOneNoteTableOfContentsStore } from '../onestore/desktop-store.js';
|
||||
import type { DesktopOneStore } from '../onestore/desktop-store.js';
|
||||
@@ -171,7 +172,7 @@ function parseChildren(
|
||||
color: optionalColor(child),
|
||||
});
|
||||
} else {
|
||||
result.push(...parseChildren(context, child, depth + 1));
|
||||
appendItems(result, parseChildren(context, child, depth + 1));
|
||||
}
|
||||
} finally {
|
||||
context.active.delete(key);
|
||||
|
||||
Reference in New Issue
Block a user