fix: type error

This commit is contained in:
anatawa12 2025-12-12 11:46:15 +09:00
parent f0bc76835d
commit 1b2b7a8236
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
4 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ async function setAntenna() {
})),
} : undefined),
],
default: antennas.find(x => x.id === props.column.antennaId),
default: antennas.find(x => x.id === props.column.antennaId)?.id,
});
if (canceled || antennaIdOrOperation == null) return;

View File

@ -63,7 +63,7 @@ async function setChannel() {
items: channels.map(x => ({
value: x.id, label: x.name,
})),
default: channels.find(x => x.id === props.column.channelId),
default: channels.find(x => x.id === props.column.channelId)?.id,
});
if (canceled || chosenChannelId == null) return;
const chosenChannel = channels.find(x => x.id === chosenChannelId)!;

View File

@ -70,7 +70,7 @@ async function setList() {
})),
} : undefined),
],
default: lists.find(x => x.id === props.column.listId),
default: lists.find(x => x.id === props.column.listId)?.id,
});
if (canceled || listIdOrOperation == null) return;

View File

@ -54,7 +54,7 @@ async function setRole() {
items: roles.map(x => ({
value: x.id, label: x.name,
})),
default: roles.find(x => x.id === props.column.roleId),
default: roles.find(x => x.id === props.column.roleId)?.id,
});
if (canceled || roleId == null) return;
const role = roles.find(x => x.id === roleId)!;