Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
+18
-2
@@ -32,3 +32,3 @@ 'use strict'; | ||
| validate(value, { schema, state, prefs }) { | ||
| validate(value, { schema, state, prefs, error }) { | ||
@@ -39,3 +39,15 @@ Assert(schema.$_terms.link, 'Uninitialized link schema'); | ||
| const ref = schema.$_terms.link[0].ref; | ||
| return linked.$_validate(value, state.nest(linked, `link:${ref.display}:${linked.type}`), prefs); | ||
| try { | ||
| return linked.$_validate(value, state.nest(linked, `link:${ref.display}:${linked.type}`), prefs); | ||
| } | ||
| catch (err) { | ||
| /* $lab:coverage:off$ */ | ||
| if (!(err instanceof RangeError)) { | ||
| throw err; | ||
| } | ||
| /* $lab:coverage:on$ */ | ||
| return { value, errors: error('link.depth') }; | ||
| } | ||
| }, | ||
@@ -93,2 +105,6 @@ | ||
| messages: { | ||
| 'link.depth': '{{#label}} exceeds maximum recursion depth supported by the runtime' | ||
| }, | ||
| manifest: { | ||
@@ -95,0 +111,0 @@ |
+1
-1
| { | ||
| "name": "joi", | ||
| "description": "Object schema validation", | ||
| "version": "17.13.3", | ||
| "version": "17.13.4", | ||
| "repository": "git://github.com/hapijs/joi", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1834828
245.47%39
8.33%15841
59.78%3
50%