Skip to content

Commit 7f39b16

Browse files
committed
Remove accidental dependency on StarlingMonkey source in componentize.js
1 parent fad10e6 commit 7f39b16

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/componentize.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
} from '../lib/spidermonkey-embedding-splicer.js';
1818
import { fileURLToPath } from 'node:url';
1919
import { stdout, platform } from 'node:process';
20-
import { assert } from '../StarlingMonkey/tests/assert.js';
2120
export const { version } = JSON.parse(
2221
await readFile(new URL('../package.json', import.meta.url), 'utf8')
2322
);
@@ -73,7 +72,11 @@ export async function componentize(opts,
7372
opts = _deprecatedOpts || {};
7473
opts.witWorld = _deprecatedWitWorldOrOpts;
7574
} else {
76-
assert(typeof _deprecatedWitWorldOrOpts === 'object');
75+
if (typeof _deprecatedWitWorldOrOpts !== 'object') {
76+
throw new Error(
77+
`componentize: second argument must be an object or a string, but is ${typeof _deprecatedWitWorldOrOpts}`
78+
);
79+
}
7780
opts = _deprecatedWitWorldOrOpts;
7881
}
7982
}

0 commit comments

Comments
 (0)