Skip to content

Commit

Permalink
fix git option migration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed May 1, 2023
1 parent 118ed1d commit a0c61ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/src/views/GitInput.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ export default defineComponent
get_saved = =>
saved_config.value = (await get_global_state config_key) or null
if saved_config.value
Object.assign options, saved_config.value.options.filter (o) =>
# to not mess things up when changes in default options
options.some (oo) => oo.value == o.value
for option from options
saved = saved_config.value.options.find (o) =>
o.value == option.value
if saved
option.active = saved.active
# because modifying `options` this will have changed `command`
# via watchEffect, we need to wait before overwriting it
await nextTick()
Expand Down

0 comments on commit a0c61ca

Please sign in to comment.