Skip to content

Commit

Permalink
refactor(browser): improve export
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Feb 24, 2019
1 parent 261d7a6 commit 0049c4b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/browser.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Consola from './consola.js'
import BrowserReporter from './reporters/browser.js'

if (!window.consola) {
// Create new consola instance
window.consola = new Consola({
function createConsola () {
return new Consola({
reporters: [
new BrowserReporter()
]
})
}

export default window.consola
export default window.consola || createConsola()

0 comments on commit 0049c4b

Please sign in to comment.