Skip to content

Commit

Permalink
fix: admin/internet: console error after clicking cancel in router's …
Browse files Browse the repository at this point in the history
…port configuration dialog
  • Loading branch information
rejetto committed Sep 28, 2024
1 parent 72bd618 commit 7e269a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function closeDialog(v?:any, skipHistory=false) {
function closeDialogAt(i: number, value?: any) {
const [d] = dialogs.splice(i,1)
d.restoreFocus?.focus?.() // if element is not HTMLElement, it doesn't have focus method
d.closingValue = value
d.closingValue = value && typeof value === 'object' ? ref(value) : value // since this is being assigned to a valtio proxy, ref is necessary to avoid crashing with unusual (and possibly accidental) objects like React's SynteticEvents
Promise.resolve(d.closed).then(() =>
d?.onClose?.(value))
return d
Expand Down

0 comments on commit 7e269a2

Please sign in to comment.