From 75cdfaa7acbabb3bb9ddca9697b37482d69ce317 Mon Sep 17 00:00:00 2001 From: Sumanta Date: Thu, 23 Feb 2017 17:54:43 +0530 Subject: [PATCH] added null check for extend method --- lib/short.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/short.js b/lib/short.js index 1520916..328d7de 100644 --- a/lib/short.js +++ b/lib/short.js @@ -147,6 +147,7 @@ exports.list = function() { */ var extend = function(original, updates) { + original = original || {}; Object.keys(updates).forEach(function(key) { original[key] = updates[key]; });