Commit 46d14cf 1 parent cc00901 commit 46d14cf Copy full SHA for 46d14cf
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -425,10 +425,12 @@ export class ResourceManager {
425
425
}
426
426
427
427
private _parseURL ( path : string ) : { assetBaseURL : string ; queryPath : string } {
428
- const url = new URL ( path ) ;
429
- const queryPath = url . searchParams . get ( "q" ) ;
430
- url . searchParams . delete ( "q" ) ;
431
- return { assetBaseURL : url . toString ( ) , queryPath } ;
428
+ const [ baseUrl , searchStr ] = path . split ( "?" ) ;
429
+ const searchParams = new URLSearchParams ( searchStr ) ;
430
+ const queryPath = searchParams . get ( "q" ) ;
431
+ searchParams . delete ( "q" ) ;
432
+ const assetBaseURL = searchParams . size > 0 ? baseUrl + "?" + searchParams . toString ( ) : baseUrl ;
433
+ return { assetBaseURL, queryPath } ;
432
434
}
433
435
434
436
private _parseQueryPath ( string ) : string [ ] {
You can’t perform that action at this time.
0 commit comments