Skip to content

Commit 4666bf7

Browse files
authored
Cleanup autoAddDeps. NFC (#25458)
1 parent 93ca163 commit 4666bf7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/lib/libcore.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,13 +2482,11 @@ addToLibrary({
24822482
$ASSERTIONS: {{{ ASSERTIONS }}},
24832483
});
24842484

2485-
function autoAddDeps(object, name) {
2486-
for (var item in object) {
2487-
if (!item.endsWith('__deps')) {
2488-
if (!object[item + '__deps']) {
2489-
object[item + '__deps'] = [];
2490-
}
2491-
object[item + '__deps'].push(name);
2485+
function autoAddDeps(lib, name) {
2486+
for (const item of Object.keys(lib)) {
2487+
if (!isDecorator(item)) {
2488+
lib[item + '__deps'] ??= [];
2489+
lib[item + '__deps'].push(name);
24922490
}
24932491
}
24942492
}

0 commit comments

Comments
 (0)