File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,15 @@ def get_assets(self):
3939 return self .load_assets ()
4040
4141 def get_integrity_attr (self , chunk ):
42- if not self .config [ 'INTEGRITY' ] :
42+ if not self .config . get ( 'INTEGRITY' ) :
4343 return ''
4444
4545 integrity = chunk .get ('integrity' )
4646 if not integrity :
4747 raise WebpackLoaderBadStatsError (
4848 "The stats file does not contain valid data: INTEGRITY is set to True, "
49- "but chunk does not contain \" integrity\" key." )
49+ "but chunk does not contain \" integrity\" key. Maybe you forgot to add "
50+ "integrity: true in your BundleTracker configuration?" )
5051
5152 return ' integrity="{}" ' .format (integrity .partition (' ' )[0 ])
5253
@@ -65,7 +66,7 @@ def map_chunk_files_to_url(self, chunks):
6566 assets = self .get_assets ()
6667 files = assets ['assets' ]
6768
68- add_integrity = self .config [ 'INTEGRITY' ]
69+ add_integrity = self .config . get ( 'INTEGRITY' )
6970
7071 for chunk in chunks :
7172 url = self .get_chunk_url (files [chunk ])
You can’t perform that action at this time.
0 commit comments