don't fail icon check if it's not there (allows delete of missing config node)

This commit is contained in:
Dave Conway-Jones
2018-01-19 22:48:03 +00:00
parent 2700f8cdd2
commit ac3143811f

View File

@@ -170,7 +170,7 @@ RED.editor = (function() {
} }
} }
} }
if (!node._def.defaults.hasOwnProperty("icon") && node.icon) { if (node._def.hasOwnProperty("defaults") && !node._def.defaults.hasOwnProperty("icon") && node.icon) {
var iconPath = RED.utils.separateIconPath(node.icon); var iconPath = RED.utils.separateIconPath(node.icon);
var iconSets = RED.nodes.getIconSets(); var iconSets = RED.nodes.getIconSets();
var iconFileList = iconSets[iconPath.module]; var iconFileList = iconSets[iconPath.module];