diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx index 60c1a9035..59d4286a7 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx @@ -622,7 +622,7 @@ class ChartEditorDialogHandler var inputStage:Null = dialog.findComponent('inputStage', DropDown); if (inputStage == null) throw 'Could not locate inputStage DropDown in Song Metadata dialog'; inputStage.onChange = function(event:UIEvent) { - if (event.data == null && event.data.id == null) return; + if (event.data == null || event.data?.id == null) return; newSongMetadata.playData.stage = event.data.id; }; var startingValueStage = ChartEditorDropdowns.populateDropdownWithStages(inputStage, newSongMetadata.playData.stage); @@ -631,7 +631,7 @@ class ChartEditorDialogHandler var inputNoteStyle:Null = dialog.findComponent('inputNoteStyle', DropDown); if (inputNoteStyle == null) throw 'Could not locate inputNoteStyle DropDown in Song Metadata dialog'; inputNoteStyle.onChange = function(event:UIEvent) { - if (event.data.id == null) return; + if (event.data?.id == null) return; newSongMetadata.playData.noteStyle = event.data.id; }; var startingValueNoteStyle = ChartEditorDropdowns.populateDropdownWithNoteStyles(inputNoteStyle, newSongMetadata.playData.noteStyle);