Skip to content

Commit 11d2317

Browse files
authored
Use Object.assign to save a few lines of code. NFC (#16411)
1 parent 7de8b07 commit 11d2317

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/library_fs.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,7 @@ FS.staticInit();` +
124124
follow_mount: true,
125125
recurse_count: 0
126126
};
127-
for (var key in defaults) {
128-
if (opts[key] === undefined) {
129-
opts[key] = defaults[key];
130-
}
131-
}
127+
opts = Object.assign(defaults, opts)
132128

133129
if (opts.recurse_count > 8) { // max recursive lookup of 8
134130
throw new FS.ErrnoError({{{ cDefine('ELOOP') }}});

0 commit comments

Comments
 (0)