Skip to content

Commit d3e2cfd

Browse files
committed
fix(custom actions): only assign id to actions that are missing one
1 parent 6e9aaad commit d3e2cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/stores/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const useAppStore = defineStore('app', () => {
8585
) => {
8686
if (!customActions.value[target]) throw new Error('Target does not exist: ' + target)
8787
const _actions = Array.isArray(actions) ? actions : [actions]
88-
_actions.forEach((action) => (action.id = sampleID()))
88+
_actions.forEach((action) => !action.id && (action.id = sampleID()))
8989
customActions.value[target].push(..._actions)
9090
const remove = () => {
9191
customActions.value[target] = customActions.value[target].filter(

0 commit comments

Comments
 (0)