From 6960e42c24da79ca44a37a6045ee164d5707a6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Wed, 17 Jul 2019 13:25:49 -0300 Subject: [PATCH] Pretify MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/formats/json/parser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/formats/json/parser.js b/lib/formats/json/parser.js index 2c5b3dd..4731b0c 100644 --- a/lib/formats/json/parser.js +++ b/lib/formats/json/parser.js @@ -13,7 +13,8 @@ const isString = (v) => (typeof v) === "string"; const isObject = (v) => (typeof v) === "object"; const isDefined = (v) => v && (typeof v) != "undefined"; const isDefinedOrThrow = (v) => - (isDefined(v) ? () => true + (isDefined(v) + ? () => true : (() => {throw nullOrIndefinedPayload})()); const isValidPayloadOrThrow = (v) =>