fix: admin/internet/domain: "change" button stuck if dialog is cancelled

Massimo Melina committed Dec 1, 2023 at 18:51 UTC d394b2278d5a29e8243dad9111a7e134ece8dd58
2 files changed +2 -2
admin/src/InternetPage.ts
+1 -1
@@ -173,7 +173,7 @@ export default function InternetPage() {
173 h(Btn, {
174 size: 'small',
175 variant: 'outlined',
176 - onClick: () =>changeBaseUrl().then(config.reload)
176 + onClick: () => void(changeBaseUrl().then(config.reload))
177 }, "Change"),
178 domain && h(Btn, {
179 size: 'small',
src/cross.ts
+1 -1
@@ -25,7 +25,7 @@ export const CFG = constMap(['geo_enable', 'geo_allow', 'geo_list', 'geo_allow_u
25 export const LIST = { add: '+', remove: '-', update: '=', props: 'props', ready: 'ready', error: 'e' }
26 export type Dict<T=any> = Record<string, T>
27 export type Falsy = false | null | undefined | '' | 0
28 -type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T
28 +type Truthy<T> = T extends false | '' | 0 | null | undefined | void ? never : T
29 export type Callback<IN=void, OUT=void> = (x:IN) => OUT
30 export type Promisable<T> = T | Promise<T>
31