From 93fd2738aadd3aff56cd765baebc091553d689d5 Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Mon, 2 Feb 2015 19:07:45 +0100 Subject: [PATCH] Fix new custom location feature --- lib/console2.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/console2.js b/lib/console2.js index 65327ce..8f00bee 100644 --- a/lib/console2.js +++ b/lib/console2.js @@ -585,7 +585,7 @@ //use this._location if it's an object (custom location) //or build the location - var location = (this._location || this.opt.alwaysLocation) === true ? getLocation() : this._location; + var location = typeof this._location === 'object' ? this._location : getLocation(); var time = (typeof this._time !== 'boolean') ? this._time : Date.now(); @@ -609,6 +609,8 @@ opt : opt }; + console.log(log); + // Build the context string var context = this.buildContext(log, log.show);