await stuck indefinitely without catch

pull/5402/head
Tan Li Hau 5 years ago
parent 7900e3eafa
commit 3054ef986d

@ -59,12 +59,12 @@ export function handle_promise(promise, info) {
update(info.then, 1, info.value, value);
set_current_component(null);
}, error => {
if (!info.hasCatch) {
throw error;
}
set_current_component(current_component);
update(info.catch, 2, info.error, error);
set_current_component(null);
if (!info.hasCatch) {
throw error;
}
});
// if we previously had a then/catch block, destroy it

@ -39,6 +39,7 @@ export default {
})
.catch((err) => {
assert.equal(err.message, 'this error should be thrown');
assert.htmlEqual(target.innerHTML, '');
});
}
};
Loading…
Cancel
Save