Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Dec 12, 2024
1 parent dc469f4 commit 762b9d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Dialogs/_AddSegmentDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function ConfirmationDialogRaw(props: any) {
value={props.deviceList[device].id}
key={props.deviceList[device].id}
>
{virtuals[props.deviceList[device].id]?.config.name || props.deviceList[device]?.config.name}
{virtuals[props.deviceList[device].id]?.config?.name || props.deviceList[device]?.config?.name}
</MenuItem>
))}
</Select>
Expand Down Expand Up @@ -139,7 +139,7 @@ export default function ConfirmationDialog({
if (device && device?.config) {
const temp = [
...virtual.segments,
[device.id, 0, device.config.pixel_count - 1, false]
[device.id, 0, device?.config?.pixel_count - 1, false]
]
const test = temp.filter((t) => t.length === 4)

Expand All @@ -156,19 +156,19 @@ export default function ConfirmationDialog({
setEffect(
virtual.id,
virtuals[device.active_virtuals[0]].effect.type,
virtuals[device.active_virtuals[0]].effect.config,
virtuals[device.active_virtuals[0]].effect?.config,
true
)
} else {
setEffect(virtual.id, 'rainbow', {}, true)
}
}
if (device && device.config) {
if (device && device?.config) {
highlightSegment(
virtual.id,
device.id,
0,
device.config.pixel_count - 1,
device?.config?.pixel_count - 1,
false
)
}
Expand Down

0 comments on commit 762b9d3

Please sign in to comment.