diff --git a/dist/readers/Console.js b/dist/readers/Console.js index 94a647a..d5e43f7 100644 --- a/dist/readers/Console.js +++ b/dist/readers/Console.js @@ -129,6 +129,10 @@ var _class = function () { transient.callsite = _this.callSite(); } + if (!args.length) { + args = ['']; + } + // reset before async _this.reset(); diff --git a/dist/transforms/Inspector.js b/dist/transforms/Inspector.js index 32dd388..5fc1256 100644 --- a/dist/transforms/Inspector.js +++ b/dist/transforms/Inspector.js @@ -113,7 +113,6 @@ var Inspector = function () { }, { key: 'inspectArguments', value: function inspectArguments(data) { - if (!data.length) return ''; return this.format.apply(this, (0, _toConsumableArray3.default)(data.args)); } }, { diff --git a/src/readers/Console.js b/src/readers/Console.js index 6aa89b2..3d255f7 100644 --- a/src/readers/Console.js +++ b/src/readers/Console.js @@ -77,6 +77,10 @@ export default class { transient.callsite = this.callSite(); } + if (!args.length){ + args = ['']; + } + // reset before async this.reset(); diff --git a/tests/console.test.js b/tests/console.test.js index 57b99ee..ea98ef8 100644 --- a/tests/console.test.js +++ b/tests/console.test.js @@ -10,7 +10,8 @@ describe('Basic Scribe', ()=> { it('should print objects to terminal', done => { Promise.all([ console.tag('object').log('Inspect object', {test: true}), - console.tag('object').log('Inspect object', console) + console.tag('object').log('Inspect object', console), + console.log() ]).then(() => done()); });