Skip to content

Commit

Permalink
feat(devtool): allow usage in non-browser environments (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 authored and yyx990803 committed Feb 18, 2019
1 parent 1fd2fc4 commit 665455f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugins/devtool.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const devtoolHook =
typeof window !== 'undefined' &&
window.__VUE_DEVTOOLS_GLOBAL_HOOK__
const target = typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {}
const devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__

export default function devtoolPlugin (store) {
if (!devtoolHook) return
Expand Down

0 comments on commit 665455f

Please sign in to comment.