pull/3663/head
Conduitry 6 years ago
parent 92c9993d9e
commit 434e4fa04f

@ -14,7 +14,7 @@ export function handle_promise(promise, info) {
const child_ctx = assign(assign({}, info.ctx), info.resolved); const child_ctx = assign(assign({}, info.ctx), info.resolved);
const block = type && (info.current = type)(child_ctx); const block = type && (info.current = type)(child_ctx);
let needFlush = false; let needs_flush = false;
if (info.block) { if (info.block) {
if (info.blocks) { if (info.blocks) {
@ -35,13 +35,13 @@ export function handle_promise(promise, info) {
transition_in(block, 1); transition_in(block, 1);
block.m(info.mount(), info.anchor); block.m(info.mount(), info.anchor);
needFlush = true; needs_flush = true;
} }
info.block = block; info.block = block;
if (info.blocks) info.blocks[index] = block; if (info.blocks) info.blocks[index] = block;
if (needFlush) { if (needs_flush) {
flush(); flush();
} }
} }

@ -1,7 +0,0 @@
let _resolvePromise;
export const resolvePromise = () => _resolvePromise();
export const promise = new Promise(resolve => {
_resolvePromise = resolve();
});
Loading…
Cancel
Save