From 8342c06e274333910fd97a92dd44cecfe8494511 Mon Sep 17 00:00:00 2001 From: Nathan Dinsmore Date: Mon, 15 Apr 2013 20:29:03 -0400 Subject: Fixed #47 --- xml.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xml.js') diff --git a/xml.js b/xml.js index 877fff7..88ffd6d 100644 --- a/xml.js +++ b/xml.js @@ -246,7 +246,8 @@ XML_Element.prototype.toString = function (isFormatted, indentationLevel) { // attributes, if any for (key in this.attributes) { - if (this.attributes.hasOwnProperty(key) && this.attributes[key]) { + if (Object.prototype.hasOwnProperty.call(this.attributes, key) + && this.attributes[key]) { result += ' ' + key + '="' + this.attributes[key] + '"'; } } -- cgit v1.3.1