mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20:23 +01:00
feat(lax): parse the window index to a number
This commit is contained in:
6
lax
6
lax
@@ -36,9 +36,13 @@ function parse_args(argv) {
|
|||||||
if (browser == undefined) {
|
if (browser == undefined) {
|
||||||
browser = safari;
|
browser = safari;
|
||||||
}
|
}
|
||||||
|
let index = Number(args[0]);
|
||||||
|
if (Number.isNaN(index)) {
|
||||||
|
throw `Invalid window index: ${args[0]}`;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
browser,
|
browser,
|
||||||
index: args[0],
|
index,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user