@cdxoo/formik-ajv-async
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -48,7 +48,9 @@ "use strict"; | ||
if (!instancePath) { | ||
if (!instancePath && instancePath !== '') { | ||
var dataPath = err.dataPath; | ||
if (dataPath) { | ||
instancePath = dataPath.replace(/\./g, '/'); | ||
instancePath = dataPath.replace(/\[(\d+)\]/g, function (m, backref) { | ||
return ".".concat(backref); | ||
}).replace(/\./g, '/'); | ||
} else { | ||
@@ -55,0 +57,0 @@ throw new Error("ajv error object does neither contain instancePath nor dataPath (ajv v6); error data: ".concat(JSON.stringify(err))); |
@@ -37,7 +37,9 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } | ||
if (!instancePath) { | ||
if (!instancePath && instancePath !== '') { | ||
var dataPath = err.dataPath; | ||
if (dataPath) { | ||
instancePath = dataPath.replace(/\./g, '/'); | ||
instancePath = dataPath.replace(/\[(\d+)\]/g, function (m, backref) { | ||
return ".".concat(backref); | ||
}).replace(/\./g, '/'); | ||
} else { | ||
@@ -44,0 +46,0 @@ throw new Error("ajv error object does neither contain instancePath nor dataPath (ajv v6); error data: ".concat(JSON.stringify(err))); |
{ | ||
"name": "@cdxoo/formik-ajv-async", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/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
21902
397