File tree 2 files changed +2
-18
lines changed 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -199,15 +199,7 @@ class CallbackInterface {
199
199
generateInstall ( ) {
200
200
if ( this . constants . size > 0 ) {
201
201
this . str += `
202
- const exposed = new Set([
203
- ` ;
204
-
205
- for ( const globalName of this . exposed ) {
206
- this . str += `"${ globalName } ",\n` ;
207
- }
208
-
209
- this . str += `
210
- ]);
202
+ const exposed = new Set(${ JSON . stringify ( [ ...this . exposed ] ) } );
211
203
` ;
212
204
}
213
205
Original file line number Diff line number Diff line change @@ -1463,15 +1463,7 @@ class Interface {
1463
1463
const { idl, name } = this ;
1464
1464
1465
1465
this . str += `
1466
- const exposed = new Set([
1467
- ` ;
1468
-
1469
- for ( const globalName of this . exposed ) {
1470
- this . str += `"${ globalName } ",\n` ;
1471
- }
1472
-
1473
- this . str += `
1474
- ]);
1466
+ const exposed = new Set(${ JSON . stringify ( [ ...this . exposed ] ) } );
1475
1467
1476
1468
exports.install = (globalObject, globalNames) => {
1477
1469
let isExposed = false;
You can’t perform that action at this time.
0 commit comments