Use the theme name if it exists (#3843)

This commit is contained in:
Sam El-Husseini
2020-04-29 14:32:26 -07:00
committed by GitHub
parent 74260102c4
commit 52b818ed67

View File

@@ -283,7 +283,7 @@ Blockly.Options.parseThemeOptions_ = function(options) {
if (theme instanceof Blockly.Theme) {
return /** @type {!Blockly.Theme} */ (theme);
}
return Blockly.Theme.defineTheme('builtin', theme);
return Blockly.Theme.defineTheme(theme.name || 'builtin', theme);
};
/**