@vercel/routing-utils
Advanced tools
Comparing version 1.8.3-canary.2 to 1.8.3-canary.3
@@ -161,11 +161,5 @@ "use strict"; | ||
} | ||
function createError(code, errors, link, action) { | ||
let message; | ||
let otherErrors = []; | ||
if (Array.isArray(errors)) { | ||
[message, ...otherErrors] = errors; | ||
} | ||
else { | ||
message = errors; | ||
} | ||
function createError(code, allErrors, link, action) { | ||
const errors = Array.isArray(allErrors) ? allErrors : [allErrors]; | ||
const message = errors[0]; | ||
const error = { | ||
@@ -176,3 +170,3 @@ code, | ||
action, | ||
otherErrors, | ||
errors, | ||
}; | ||
@@ -179,0 +173,0 @@ return error; |
@@ -7,3 +7,3 @@ import { HandleValue } from './index'; | ||
action?: string; | ||
otherErrors?: string[]; | ||
errors?: string[]; | ||
}; | ||
@@ -10,0 +10,0 @@ export declare type Source = { |
{ | ||
"name": "@vercel/routing-utils", | ||
"version": "1.8.3-canary.2", | ||
"version": "1.8.3-canary.3", | ||
"description": "Vercel routing utilities", | ||
@@ -33,3 +33,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "b16f94098af561ab9ea12597fd019a1ac423cc38" | ||
"gitHead": "45d05a603b0d883461e5ed6aa5d1bf18d4a3cc55" | ||
} |
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
45596
1056