xmlbuilder
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -49,3 +49,3 @@ (function() { | ||
var child, i, key, val, _ref, _ref2; | ||
if (this.isRoot) { | ||
if (this.isRoot || this.isDoc) { | ||
throw new Error("Cannot insert elements at root level"); | ||
@@ -87,3 +87,3 @@ } | ||
var child, i, key, val, _ref, _ref2; | ||
if (this.isRoot) { | ||
if (this.isRoot || this.isDoc) { | ||
throw new Error("Cannot insert elements at root level"); | ||
@@ -125,3 +125,3 @@ } | ||
var i, _ref; | ||
if (this.isRoot) { | ||
if (this.isRoot || this.isDoc) { | ||
throw new Error("Cannot remove the root element"); | ||
@@ -185,4 +185,4 @@ } | ||
XMLFragment.prototype.up = function() { | ||
if (!(this.parent != null)) { | ||
throw new Error("This node has no parent"); | ||
if (this.isRoot) { | ||
throw new Error("This node has no parent. Use doc() if you need to get the document object."); | ||
} | ||
@@ -215,3 +215,3 @@ return this.parent; | ||
var i; | ||
if (this.isRoot) { | ||
if (this.isRoot || this.isDoc) { | ||
throw new Error("Root node has no siblings"); | ||
@@ -227,3 +227,3 @@ } | ||
var i; | ||
if (this.isRoot) { | ||
if (this.isRoot || this.isDoc) { | ||
throw new Error("Root node has no siblings"); | ||
@@ -230,0 +230,0 @@ } |
{ | ||
"name": "xmlbuilder", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"keywords": "xml xmlbuilder", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/oozcitak/xmlbuilder-js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15475