From 3a63f1ab52cc7e8c6c19b38e934cebfeda940dab Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Thu, 7 Jan 2010 01:39:21 +0000 Subject: [PATCH] BUGFIX: Check for empty git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96441 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/WidgetAreaEditor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascript/WidgetAreaEditor.js b/javascript/WidgetAreaEditor.js index 43f23eee..d8a61b71 100644 --- a/javascript/WidgetAreaEditor.js +++ b/javascript/WidgetAreaEditor.js @@ -63,6 +63,9 @@ WidgetAreaEditorClass.prototype = { this.name = this.getAttribute('name'); var monkeyWith = function(widgets, name) { + if (!widgets) { + return; + } for(var i = 0; i < widgets.length; i++) { widget = widgets[i]; if (!widget.getAttribute('rewritten') && (widget.id || widget.name)) {