From 6bc3f82afe8dcb9eed0867eb9ab23a8208d2ae16 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 30 Jun 2016 00:38:48 +0100 Subject: [PATCH] Protect against node type names that clash with Object property names Fixes #917 --- editor/js/ui/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index ed281fbbc..27d836b4e 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -724,7 +724,7 @@ RED.editor = (function() { } } } - if (editTrayWidthCache[type]) { + if (editTrayWidthCache.hasOwnProperty(type)) { trayOptions.width = editTrayWidthCache[type]; }