File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44import { oneLine } from 'common-tags' ;
55import queryString from 'query-string' ;
6- import JSZip from 'jszip' ;
6+ import type JSZip from 'jszip' ;
77import {
88 insertExternalMarkersIntoProfile ,
99 insertExternalPowerCountersIntoProfile ,
@@ -1045,6 +1045,7 @@ async function _extractZipFromResponse(
10451045 // that comes from this realm.
10461046 const typedBuffer = new Uint8Array ( buffer ) ;
10471047 try {
1048+ const JSZip = await import ( 'jszip' ) ;
10481049 const zip = await JSZip . loadAsync ( typedBuffer ) ;
10491050 // Catch the error if unable to load the zip.
10501051 return zip ;
@@ -1235,6 +1236,7 @@ export function retrieveProfileFromFile(
12351236 if ( _deduceContentType ( file . name , file . type ) === 'application/zip' ) {
12361237 // Open a zip file in the zip file viewer
12371238 const buffer = await fileReader ( file ) . asArrayBuffer ( ) ;
1239+ const JSZip = await import ( 'jszip' ) ;
12381240 const zip = await JSZip . loadAsync ( buffer ) ;
12391241 await dispatch ( receiveZipFile ( zip ) ) ;
12401242 } else {
You can’t perform that action at this time.
0 commit comments