summaryrefslogtreecommitdiff
path: root/xml.js
diff options
context:
space:
mode:
Diffstat (limited to 'xml.js')
-rw-r--r--xml.js3
1 files changed, 2 insertions, 1 deletions
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] + '"';
}
}