From 7ff63ae2a3c7b4bdcf43db53a99d46d2c0b55846 Mon Sep 17 00:00:00 2001 From: Matt Spence Date: Thu, 14 Apr 2011 22:38:38 +0100 Subject: [PATCH] Added check on popup content variable for undefined to prevent content being to string 'undefined' when setContent hasn't been called yet --- src/layer/Popup.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layer/Popup.js b/src/layer/Popup.js index bf67d611..dff0b204 100644 --- a/src/layer/Popup.js +++ b/src/layer/Popup.js @@ -93,7 +93,8 @@ L.Popup = L.Class.extend({ _updateContent: function() { //TODO accept DOM nodes along with HTML strings - this._contentNode.innerHTML = this._content; + if (this._content != undefined) + this._contentNode.innerHTML = this._content; }, _updateLayout: function() {