fix(portal): typecheck error in scheduling (TS18048)
ci / typecheck (map[dir:apps/portal name:portal]) (push) Has been cancelled
ci / typecheck (map[dir:apps/website name:website]) (push) Has been cancelled
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / typecheck (map[dir:apps/booking name:booking]) (push) Has been cancelled
ci / typecheck (map[dir:apps/portal name:portal]) (push) Has been cancelled
ci / typecheck (map[dir:apps/website name:website]) (push) Has been cancelled
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / typecheck (map[dir:apps/booking name:booking]) (push) Has been cancelled
timeToMin destructured [h, m] from t.split(':').map(Number); under
noUncheckedIndexedAccess those are number|undefined, so `h * 60` errored. Use
default-value destructuring ([h = 0, m = 0]). Surfaced now that the Gitea runner
actually runs the typecheck job (it never ran before).
This commit is contained in:
@@ -266,7 +266,7 @@ function addOverride() {
|
|||||||
function removeOverride(idx: number) {
|
function removeOverride(idx: number) {
|
||||||
availForm.overrides.splice(idx, 1)
|
availForm.overrides.splice(idx, 1)
|
||||||
}
|
}
|
||||||
const timeToMin = (t: string) => { const [h, m] = t.split(':').map(Number); return h * 60 + m }
|
const timeToMin = (t: string) => { const [h = 0, m = 0] = t.split(':').map(Number); return h * 60 + m }
|
||||||
async function submitAvail() {
|
async function submitAvail() {
|
||||||
if (!selectedHostId.value) return
|
if (!selectedHostId.value) return
|
||||||
availBusy.value = true
|
availBusy.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user