From 4875dd17c4314f8bdda8852adb99cf89dc725422 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Wed, 2 Sep 2015 12:41:21 +0200 Subject: [PATCH] Fix exposing the error Using a promise for the setTimeout call is broken in this case, as the error would again be thrown in a promise operation, and so not exposed --- src/js/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/util.js b/src/js/util.js index c0e22cd..6d67875 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -119,9 +119,9 @@ function tick() { // // - __error__ - Error/exception object to be re-thrown to the browser. function exposeError(error) { - tick().then(() => { + setTimeout(() => { throw error; - }); + }, 0); } export default {