Skip to content

Commit f676b41

Browse files
committed
Fix for old node versions
1 parent ed0474f commit f676b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library_fs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ FS.staticInit();
670670
mknod(path, mode, dev) {
671671
var lookup = FS.lookupPath(path, { parent: true });
672672
var parent = lookup.node;
673-
var name = path.split('/').filter((p) => !!p && (p !== '.')).at(-1);
673+
var name = path.split('/').filter((p) => !!p && (p !== '.')).pop();
674674
if (!name) {
675675
throw new FS.ErrnoError({{{ cDefs.EINVAL }}});
676676
}

0 commit comments

Comments
 (0)