@@ -38,7 +38,8 @@ def get_assets(self):
3838 return  self .load_assets ()
3939
4040 def  filter_chunks (self , chunks ):
41-  for  chunk_name  in  chunks :
41+  for  c  in  chunks :
42+  chunk_name  =  c .get ('name' )
4243 ignore  =  any (regex .match (chunk_name )
4344 for  regex  in  self .config ['ignores' ])
4445 if  not  ignore :
@@ -49,10 +50,13 @@ def filter_chunks(self, chunks):
4950 yield  chunk 
5051
5152 def  get_chunk_url (self , chunk_name ):
52-  chunk  =  self .get_assets ().get ('assets' ).get (chunk_name )
53-  public_path  =  chunk .get ('publicPath' )
54-  if  public_path :
55-  return  public_path 
53+  try :
54+  chunk  =  self .get_assets ().get ('assets' ).get (chunk_name )
55+  public_path  =  chunk .get ('publicPath' )
56+  if  public_path :
57+  return  public_path 
58+  except  Exception  as  e :
59+  print (e )
5660
5761 relpath  =  '{0}{1}' .format (
5862 self .config ['BUNDLE_DIR_NAME' ], chunk_name 
@@ -83,7 +87,8 @@ def get_bundle(self, bundle_name):
8387 if  assets .get ('status' ) ==  'done' :
8488 chunks  =  assets ['chunks' ].get (bundle_name , None )
8589 if  chunks  is  None :
86-  raise  WebpackBundleLookupError ('Cannot resolve bundle {0}.' .format (bundle_name ))
90+  raise  WebpackBundleLookupError (
91+  'Cannot resolve bundle {0}.' .format (bundle_name ))
8792 return  self .filter_chunks (chunks )
8893
8994 elif  assets .get ('status' ) ==  'error' :
0 commit comments