Better handling of concurrent prompts issues (thanks billarbor for reporting).
This commit is contained in:
parent
34c0698e4c
commit
434dddcea0
|
@ -88,10 +88,11 @@ var Prompts = (() => {
|
|||
this.done = () => {};
|
||||
winMan.close();
|
||||
resolve(this.result);
|
||||
if (promptData === this) {
|
||||
promptData = null;
|
||||
if (backlog.length) {
|
||||
winMan.open(backlog.shift());
|
||||
} else {
|
||||
promptData = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
.forEach(p => window[p] = bg[p]);
|
||||
let data = Prompts.promptData;
|
||||
debug(data);
|
||||
if (!data) {
|
||||
error("Missing promptData");
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
let {title, message, options, checks, buttons} = data.features;
|
||||
|
||||
function labelFor(el, text) {
|
||||
|
|
Loading…
Reference in New Issue