File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,23 @@ export function __makeTemplateObject(cooked, raw) {
185
185
return cooked ;
186
186
} ;
187
187
188
+ var __getImportStarCache = function ( ) {
189
+ if ( typeof WeakMap !== "function" ) return null ;
190
+
191
+ var cache = new WeakMap ( ) ;
192
+ __getImportStarCache = function ( ) { return cache ; }
193
+ return cache ;
194
+ } ;
195
+
188
196
export function __importStar ( mod ) {
189
197
if ( mod && mod . __esModule ) return mod ;
198
+ if ( mod === null || ( typeof mod !== "object" && typeof mod !== "function" ) ) return { default : mod }
199
+ var cache = __getImportStarCache ( ) ;
200
+ if ( cache && cache . has ( mod ) ) return cache . get ( mod ) ;
190
201
var result = { } ;
191
- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
202
+ for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
192
203
result . default = mod ;
204
+ if ( cache ) cache . set ( mod , result ) ;
193
205
return result ;
194
206
}
195
207
Original file line number Diff line number Diff line change @@ -222,11 +222,23 @@ var __importDefault;
222
222
return cooked ;
223
223
} ;
224
224
225
+ var __getImportStarCache = function ( ) {
226
+ if ( typeof WeakMap !== "function" ) return null ;
227
+
228
+ var cache = new WeakMap ( ) ;
229
+ __getImportStarCache = function ( ) { return cache ; }
230
+ return cache ;
231
+ } ;
232
+
225
233
__importStar = function ( mod ) {
226
234
if ( mod && mod . __esModule ) return mod ;
235
+ if ( mod === null || ( typeof mod !== "object" && typeof mod !== "function" ) ) return { "default" : mod }
236
+ var cache = __getImportStarCache ( ) ;
237
+ if ( cache && cache . has ( mod ) ) return cache . get ( mod ) ;
227
238
var result = { } ;
228
- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
239
+ for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
229
240
result [ "default" ] = mod ;
241
+ if ( cache ) cache . set ( mod , result ) ;
230
242
return result ;
231
243
} ;
232
244
You can’t perform that action at this time.
0 commit comments