Skip to content

Commit

Permalink
🐛 prevent null or undefined parsing in getBundles (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Jun 11, 2020
1 parent 5d113a8 commit bd1640f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/getBundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function getBundles(manifest, chunks) {
}, []);

return assetsKey.reduce((bundle, asset) => {
Object.keys(manifest.assets[asset]).forEach((key) => {
Object.keys(manifest.assets[asset] || {}).forEach((key) => {
const content = manifest.assets[asset][key];
if (!bundle[key]) { bundle[key] = []; }
bundle[key] = unique([...bundle[key], ...content]);
Expand Down

0 comments on commit bd1640f

Please sign in to comment.