Refactor the window re-rendering into a utility function

This commit is contained in:
Oliver-Akins 2023-12-18 23:21:28 -07:00
parent 9d154cb303
commit b4657d18f8
2 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,4 @@
import { reloadWindows } from "../utils.mjs";
import * as hbs from "../handlebars.mjs";
Hooks.on(`hotReload`, async (data) => {
@ -24,9 +25,7 @@ Hooks.on(`hotReload`, async (data) => {
_templateCache[templateName] = template;
// Re-render open windows
for (const window of ui.windows) {
window.render(true);
};
reloadWindows();
return false;
});