Skip to content

Commit

Permalink
Fix minor uv.html issues with config loading and resize handling (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieWinchester authored Aug 3, 2023
1 parent 6f7e2dd commit 9aaf9e9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/uv.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@

const configUrl = urlAdapter.get('config');
if (configUrl) {
uv.on("configure", function({ cb }) {
fetch(configUrl).then(r => r.json()).then(cb)
uv.on("configure", function({ config, cb }) {
cb(
new Promise(function (resolve) {
fetch(configUrl).then(function (response) {
resolve(response.json());
});
})
);
})
}

Expand All @@ -48,7 +54,7 @@
$UV.setAttribute("style", "height:" + window.innerHeight + "px");
}

document.addEventListener("resize", function() {
addEventListener("resize", function() {
resize();
});

Expand Down

0 comments on commit 9aaf9e9

Please sign in to comment.