From f6f14361237453cc3427f4b2932050960789ae14 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 15 Feb 2018 15:33:19 +0000 Subject: [PATCH] getDefaultNodeIcon should handle subflow instance nodes Fixes #1635 --- editor/js/ui/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/js/ui/utils.js b/editor/js/ui/utils.js index 035c143c3..cbf1c1fe8 100644 --- a/editor/js/ui/utils.js +++ b/editor/js/ui/utils.js @@ -721,7 +721,12 @@ RED.utils = (function() { var iconPath = separateIconPath(icon_url); if (!iconPath.module) { - iconPath.module = def.set.module; + if (def.set) { + iconPath.module = def.set.module; + } else { + // Handle subflow instance nodes that don't have def.set + iconPath.module = "node-red"; + } } return iconPath; }