From 46552e7c45025c76e3f647680d7539a66bfac612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20F=2E=20Romaniello?= Date: Mon, 4 Jan 2016 12:43:10 -0300 Subject: [PATCH] minor --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ba486fb..221dba2 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,9 @@ JWT.sign = function(payload, secretOrPrivateKey, options, callback) { return typeof options[key] !== 'undefined'; })[0]; - console.warn('invalid "' + invalid_option + '" option for ' + (typeof payload) + ' payload'); + if (invalid_option) { + console.warn('invalid "' + invalid_option + '" option for ' + (typeof payload) + ' payload'); + } }