Comparing version 6.0.2 to 6.0.3
@@ -31,4 +31,4 @@ "use strict"; | ||
if (src.length > dst.length) { | ||
for (let i = dst.length; i < src.length; i++) { | ||
out.push({ op: 'remove', path: `${path === '/' ? '' : path}/${i}` }); | ||
for (let i = src.length; i > dst.length; i--) { | ||
out.push({ op: 'remove', path: `${path === '/' ? '' : path}/${i - 1}` }); | ||
} | ||
@@ -124,3 +124,3 @@ } | ||
else if (typeof parent[key] === 'undefined') { | ||
throw new Error('cannot remove, path does not exist'); | ||
throw new Error(`cannot remove, path ${p.path} does not exist`); | ||
} | ||
@@ -127,0 +127,0 @@ if (Array.isArray(parent)) { |
{ | ||
"name": "jsonref", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"description": "Javascript References ($ref) and Pointers library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.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
36864