Skip to content

Commit

Permalink
make sure that the one-time refresh does not happen too early
Browse files Browse the repository at this point in the history
  • Loading branch information
peuter committed Mar 6, 2023
1 parent 1c2f1ac commit 21e7fe8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/class/cv/plugins/OpenweatherMap.js
Expand Up @@ -50,7 +50,17 @@ qx.Class.define('cv.plugins.OpenweatherMap', {
}, this);
if (props.refresh === 0) {
// call once
this._refreshAction();
if (cv.TemplateEngine.getInstance().isDomFinished()) {
this._refreshAction();
} else {
qx.event.message.Bus.subscribe(
'setup.dom.finished',
function () {
this._refreshAction();
},
this
);
}
}
},

Expand Down

0 comments on commit 21e7fe8

Please sign in to comment.