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):
39
39
return self .load_assets ()
40
40
41
41
def get_integrity_attr (self , chunk ):
42
- if not self .config [ 'INTEGRITY' ] :
42
+ if not self .config . get ( 'INTEGRITY' ) :
43
43
return ''
44
44
45
45
integrity = chunk .get ('integrity' )
46
46
if not integrity :
47
47
raise WebpackLoaderBadStatsError (
48
48
"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?" )
50
51
51
52
return ' integrity="{}" ' .format (integrity .partition (' ' )[0 ])
52
53
@@ -65,7 +66,7 @@ def map_chunk_files_to_url(self, chunks):
65
66
assets = self .get_assets ()
66
67
files = assets ['assets' ]
67
68
68
- add_integrity = self .config [ 'INTEGRITY' ]
69
+ add_integrity = self .config . get ( 'INTEGRITY' )
69
70
70
71
for chunk in chunks :
71
72
url = self .get_chunk_url (files [chunk ])
You can’t perform that action at this time.
0 commit comments