Skip to content

Commit

Permalink
fix to be compatible with ng9
Browse files Browse the repository at this point in the history
  • Loading branch information
luizb committed May 10, 2020
1 parent ceeab1e commit 37d20bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -26,7 +26,8 @@ function resolveImageSrc(loaderContext, image, callback) {

// Update the image src property to match the generated filename
// Is it always the first key in the assets object?
image.src = Object.keys(module.assets)[0];
if(module.assets)
image.src = Object.keys(module.assets)[0];

callback(null);
});
Expand Down

0 comments on commit 37d20bd

Please sign in to comment.