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) =>