diff --git a/src/moto/space.js b/src/moto/space.js index 5d9077a7..a5517838 100644 --- a/src/moto/space.js +++ b/src/moto/space.js @@ -198,7 +198,10 @@ viewControl.setPosition(pos); updateLastAction(); refresh(); - try { if (pos.then) pos.then(); } catch (e) { } + let { then } = pos; + if (typeof then === 'function') { + then(); + } }). start(); }