Skip to content

Commit 7134c9b

Browse files
fix: use Object.create(null) for dictionary object in toJson serialization
Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/bf4dc31b-0da1-4979-b465-0bdff2d00028 Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
1 parent 0edbc42 commit 7134c9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libraries/lookup-by-path/src/LookupByPath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ export class LookupByPath<TItem extends {}> implements IReadonlyLookupByPath<TIt
633633
}
634634

635635
if (node.children && node.children.size > 0) {
636-
const children: Record<string, ISerializedPathTrieNode> = {};
636+
const children: Record<string, ISerializedPathTrieNode> = Object.create(null);
637637
for (const [segment, child] of node.children) {
638638
children[segment] = serializeNode(child);
639639
}

0 commit comments

Comments
 (0)