Skip to content

Commit

Permalink
fix: fix invalidate
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Nov 14, 2024
1 parent 2d730c7 commit 4e2514c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
mutationFn: trpc.record.trigger.mutate,
async onSuccess(data, variables, context) {
gridViewStore.exitEditing()
await recordsStore.invalidateRecord($table, recordId)
await recordsStore?.invalidateRecord($table, recordId)
},
onError(error: Error) {
toast.error(error.message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
function onSuccess(id?: string) {
if (id) {
recordStore.invalidateRecord($table, id, $viewId)
recordStore?.invalidateRecord($table, id, $viewId)
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
async onSuccess(data, variables) {
const value = variables.values[field.id.value]
if (isUserFieldMacro(value)) {
await store.invalidateRecord($table, recordId)
await store?.invalidateRecord($table, recordId)
}
},
onError(error: Error) {
Expand Down

0 comments on commit 4e2514c

Please sign in to comment.