Skip to content

Commit

Permalink
fix: handle null and undefined calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Mar 31, 2018
1 parent c5137e4 commit 1f98bb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/consola.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export default class Consola {

_createLogFn (defaults) {
return opts => {
if (!opts) {
return this
}

const logObj = Object.assign({
date: new Date()
}, defaults)
Expand Down

0 comments on commit 1f98bb1

Please sign in to comment.