Fix bug
This commit is contained in:
parent
b1655740df
commit
0ff27f65b3
2 changed files with 3 additions and 3 deletions
|
@ -9,14 +9,14 @@ export default (os: OS) => opts => {
|
||||||
note: o.renote,
|
note: o.renote,
|
||||||
animation: o.animation == null ? true : o.animation
|
animation: o.animation == null ? true : o.animation
|
||||||
});
|
});
|
||||||
if (opts.cb) vm.$once('closed', opts.cb);
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
} else {
|
} else {
|
||||||
const vm = os.new(PostFormWindow, {
|
const vm = os.new(PostFormWindow, {
|
||||||
reply: o.reply,
|
reply: o.reply,
|
||||||
animation: o.animation == null ? true : o.animation
|
animation: o.animation == null ? true : o.animation
|
||||||
});
|
});
|
||||||
if (opts.cb) vm.$once('closed', opts.cb);
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default (os) => (opts) => {
|
||||||
}).$mount();
|
}).$mount();
|
||||||
vm.$once('cancel', recover);
|
vm.$once('cancel', recover);
|
||||||
vm.$once('posted', recover);
|
vm.$once('posted', recover);
|
||||||
if (opts.cb) vm.$once('closed', opts.cb);
|
if (o.cb) vm.$once('closed', o.cb);
|
||||||
document.body.appendChild(vm.$el);
|
document.body.appendChild(vm.$el);
|
||||||
(vm as any).focus();
|
(vm as any).focus();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue