Skip to content

Commit

Permalink
fix computed setter infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Apr 5, 2024
1 parent 1fdef1f commit 7b88664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/User/UserActivityBarSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const enableActivityBar: WritableComputedRef<Boolean> = computed({
get: () => {
return userStore.showActivityBar;
},
set: () => {
set: (toggle) => {
// always toggle tool side panel when enabling activity bar
if (userStore.toggledSideBar !== "tools") {
userStore.toggleSideBar("tools");
}
// toggle activity bar
userStore.toggleActivityBar();
userStore.showActivityBar = toggle;
},
});
</script>
Expand Down

0 comments on commit 7b88664

Please sign in to comment.