diff --git a/src/components/costume-canvas.js b/src/components/costume-canvas.js index ac0646756..368d52a9b 100644 --- a/src/components/costume-canvas.js +++ b/src/components/costume-canvas.js @@ -25,6 +25,9 @@ class CostumeCanvas extends React.Component { } } draw () { + if (!this.refs.costumeCanvas) { + return; + } // Draw the costume to the rendered canvas. const img = this.img; const context = this.refs.costumeCanvas.getContext('2d'); diff --git a/src/components/library.js b/src/components/library.js index 203c7aa5f..f301329ce 100644 --- a/src/components/library.js +++ b/src/components/library.js @@ -28,8 +28,8 @@ class LibraryComponent extends React.Component { return ; });