Comparing version 10.3.1 to 10.3.2
@@ -154,3 +154,5 @@ 'use strict'; | ||
if (!message) { | ||
error.message = error.annotate(); | ||
if (typeof error.annotate === 'function') { | ||
error.message = error.annotate(); | ||
} | ||
throw error; | ||
@@ -160,3 +162,3 @@ } | ||
if (!(message instanceof Error)) { | ||
error.message = message + ' ' + error.annotate(); | ||
error.message = `${message} ${typeof error.annotate === 'function' ? error.annotate() : error.message}`; | ||
throw error; | ||
@@ -163,0 +165,0 @@ } |
{ | ||
"name": "joi", | ||
"description": "Object schema validation", | ||
"version": "10.3.1", | ||
"version": "10.3.2", | ||
"homepage": "https://github.com/hapijs/joi", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hapijs/joi", |
@@ -128,3 +128,3 @@ ![joi Logo](https://raw.github.com/hapijs/joi/master/images/joi.png) | ||
# API | ||
See the [API Reference](https://github.com/hapijs/joi/blob/v10.3.1/API.md). | ||
See the [API Reference](https://github.com/hapijs/joi/blob/v10.3.2/API.md). | ||
@@ -131,0 +131,0 @@ # Browsers |
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
158734
3752