diff --git a/src/mami.js/youare.jsx b/src/mami.js/youare.jsx index 112b59d..4c01d3e 100644 --- a/src/mami.js/youare.jsx +++ b/src/mami.js/youare.jsx @@ -20,8 +20,13 @@ const MamiYouAreAnIdiot = function() { const pub = { getElement: () => html, onViewPush: () => { - return new Promise((resolve, reject) => { + return new Promise(resolve => { const soundMgr = mami.getSound(); + if(soundMgr === undefined || soundMgr === null) { + resolve(); + return; + } + const soundSrcs = mami.getSoundLibrary().getSound('misc:youare').getSources(); soundMgr.load('youarebgm', soundSrcs, (success, buffer) => { if(success) { @@ -32,7 +37,7 @@ const MamiYouAreAnIdiot = function() { soundSrc.setLoop(); soundSrc.play(); resolve(); - } else reject(); + } else resolve(); }); }); },