File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {
1717} from '../lib/spidermonkey-embedding-splicer.js' ;
1818import { fileURLToPath } from 'node:url' ;
1919import { stdout , platform } from 'node:process' ;
20- import { assert } from '../StarlingMonkey/tests/assert.js' ;
2120export 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 }
You can’t perform that action at this time.
0 commit comments