Skip to content

Commit

Permalink
Bug hunt 3 (#564)
Browse files Browse the repository at this point in the history
* Fix applyPreset, don't use updateFromRange to avoid infinite loop

* Ensure user is defined before rendering app (in response to Sentry event 1a573fba85db4fb1a78735051daa3317)
  • Loading branch information
annehaley authored Aug 16, 2022
1 parent be8391d commit 61cce38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion web_client/src/components/WindowWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export default defineComponent({
currentRange.value = windowPresets.find(
(preset) => preset.value === presetId,
).apply(widthMin.value, widthMax.value);
updateFromRange(currentRange.value);
const [v0, v1] = currentRange.value;
const ww = v1 - v0;
const wl = v0 + Math.floor(ww / 2);
updateRender(ww, wl);
}
onMounted(() => {
Expand Down
2 changes: 1 addition & 1 deletion web_client/src/views/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default defineComponent({
</script>

<template>
<div>
<div v-if="user">
<Navbar />
<div class="d-flex">
<v-card class="project-list-container">
Expand Down

0 comments on commit 61cce38

Please sign in to comment.