From 6b2bfb18b24b1e23b9eadf10ec100201c88bbdff Mon Sep 17 00:00:00 2001 From: Tomasz Sikora Date: Fri, 25 Nov 2016 09:26:32 +0100 Subject: [PATCH] check if not null --- src/voucherify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/voucherify.js b/src/voucherify.js index 72eb714..6516e1f 100644 --- a/src/voucherify.js +++ b/src/voucherify.js @@ -10,7 +10,7 @@ const assertOption = (options, name) => { const encode = (value = '') => encodeURIComponent(value) const isString = (value) => typeof (value) === 'string' -const isObject = (value) => typeof (value) === 'object' && !Array.isArray(value) +const isObject = (value) => typeof (value) === 'object' && !Array.isArray(value) && value !== null const isFunction = (value) => typeof (value) === 'function' module.exports = function (options) {