diff --git a/demo/game/index.js b/demo/game/index.js index 7dd24e1..58f2409 100644 --- a/demo/game/index.js +++ b/demo/game/index.js @@ -38,7 +38,9 @@ export default class Game extends Component { } componentWillUnmount() { - this.stopMusic(); + if(this.stopMusic){ + this.stopMusic(); + } this.keyListener.unsubscribe(); }