Added check on popup content variable for undefined to prevent content being to string 'undefined' when setContent hasn't been called yet

This commit is contained in:
Matt Spence 2011-04-14 22:38:38 +01:00
parent ef8b0c9a9b
commit 7ff63ae2a3

View File

@ -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() {