Skip to content

Commit

Permalink
fix: can not remove argument from custom decoder (tiny-craft#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Sep 3, 2024
1 parent 2388f30 commit eaa68df
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions frontend/src/stores/preferences.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia'
import { lang } from '@/langs/index.js'
import { cloneDeep, findIndex, get, isEmpty, join, map, merge, pick, set, some, split } from 'lodash'
import { cloneDeep, findIndex, get, isEmpty, join, map, pick, set, some, split } from 'lodash'
import {
CheckForUpdate,
GetBuildInDecoder,
Expand Down Expand Up @@ -427,15 +427,15 @@ const usePreferencesStore = defineStore('preferences', {
return false
}

this.decoder[idx] = merge(this.decoder[idx], {
name: newName || name,
enable,
auto,
encodePath,
encodeArgs,
decodePath,
decodeArgs,
})
let selDecoder = this.decoder[idx]
selDecoder.name = newName || name
selDecoder.enable = enable
selDecoder.auto = auto
selDecoder.encodePath = encodePath
selDecoder.encodeArgs = encodeArgs
selDecoder.decodePath = decodePath
selDecoder.decodeArgs = decodeArgs
this.decoder[idx] = selDecoder
return true
},

Expand Down

0 comments on commit eaa68df

Please sign in to comment.