timeout on heal call to allow alert to show

This commit is contained in:
Stewart Allen 2021-09-07 13:39:54 -04:00
commit 65cc62d172

View file

@ -862,6 +862,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
} else { } else {
return; return;
} }
setTimeout(() => {
let healed = 0; let healed = 0;
for (let w of widgets) { for (let w of widgets) {
if (w.heal()) { if (w.heal()) {
@ -874,6 +875,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
} else { } else {
API.show.alert('Nothing found to heal'); API.show.alert('Nothing found to heal');
} }
}, 1);
} }
function forAllWidgets(f) { function forAllWidgets(f) {