Skip to content
Snippets Groups Projects

#3483496 - Made autoselect for a single option in the select. Simplified the...

Files
2
@@ -278,6 +278,10 @@ abstract class DerivableContextSourceBase extends SourcePluginBase {
}
}
}
// Set default value to the only available option.
if (!$derivable_context && count($options_derivable_contexts) === 1) {
$derivable_context = array_key_first($options_derivable_contexts);
}
return $derivable_context;
}
Loading