Added null check to log

Project: 
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/355f4c23
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/355f4c23
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/355f4c23

Branch: refs/heads/master
Commit: 355f4c2353c8b1598fcd46922e94465162acf04e
Parents: 90a18a5
Author: Rob Foley <rob.foley...@gmail.com>
Authored: Tue Sep 20 10:36:17 2016 -0400
Committer: Rob Foley <rob.foley...@gmail.com>
Committed: Tue Sep 20 10:36:17 2016 -0400

----------------------------------------------------------------------
 src/main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/355f4c23/src/main.js
----------------------------------------------------------------------
diff --git a/src/main.js b/src/main.js
index 5bf2135..c48aef8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -76,7 +76,7 @@ export function options(newConfig) {
 }
 
 export function log(customLog) {
-  if (typeof customLog === 'object') {
+  if (customLog !== null && typeof customLog === 'object') {
     logs.push(customLog);
     return true;
   } else {

Reply via email to