Fix defineTheme startHats (#3842)

typeof null === "object", go figure..
This commit is contained in:
Sam El-Husseini
2020-04-22 15:38:50 -07:00
committed by GitHub
parent ba682040b1
commit 33cb4d6feb

View File

@@ -45,7 +45,7 @@ Blockly.utils.object.mixin = function(target, source) {
*/
Blockly.utils.object.deepMerge = function(target, source) {
for (var x in source) {
if (typeof source[x] === 'object') {
if (source[x] != null && typeof source[x] === 'object') {
target[x] = Blockly.utils.object.deepMerge(
target[x] || Object.create(null), source[x]);
} else {