Skip to content

Commit a73a650

Browse files
committed
Ensuring that the last parameter is parsed - fixes tests
1 parent e661f63 commit a73a650

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/worker-script/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ const parseArgs = (command) => {
7272
args.push(arg)
7373
}
7474

75+
if (prevDelimiter != command.length) {
76+
args.push(command.substring(prevDelimiter))
77+
}
78+
7579
return args;
7680
}
7781

@@ -83,7 +87,7 @@ const run = ({
8387
if (Module === null) {
8488
throw NO_LOAD_ERROR;
8589
} else {
86-
const args = [...defaultArgs, ...parseArgs(_args))].filter((s) => s.length !== 0);
90+
const args = [...defaultArgs, ...parseArgs(_args)].filter((s) => s.length !== 0);
8791
ffmpeg(args.length, strList2ptr(Module, args));
8892
res.resolve({
8993
message: `Complete ${args.join(' ')}`,

0 commit comments

Comments
 (0)