Avoid error if label is missing

This commit is contained in:
nathan 2022-05-02 17:43:10 -06:00
parent bbb6444dce
commit 215dc21ec5

View File

@ -190,7 +190,7 @@ export function find_select_options(widget, attr_options?, options : SelectOptio
{
let option = {value: key, label: content_options[key]}
// This could be an option group - not sure we have any
if(typeof option.label !== "string")
if(typeof option.label !== "string" && option.label)
{
// @ts-ignore Yes, option.label.label is not supposed to exist but that's what we're checking
if(typeof option.label.label !== "undefined")