Skip to content

Commit

Permalink
fix: Check oImage existence before use fixes #116
Browse files Browse the repository at this point in the history
  • Loading branch information
junghwan-park committed Jan 10, 2019
1 parent 23ae046 commit d6bcd8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/component/imageLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ImageLoader extends Component {
canvas.setBackgroundImage(img, () => {
const oImage = canvas.backgroundImage;

if (oImage.getElement()) {
if (oImage && oImage.getElement()) {
resolve(oImage);
} else {
reject(rejectMessages.loadingImageFailed);
Expand Down

0 comments on commit d6bcd8e

Please sign in to comment.