File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Router.install = function (Vue) {
2323
2424// auto install
2525/* istanbul ignore if */
26- if ( window . Vue ) {
26+ if ( typeof window !== 'undefined' && window . Vue ) {
2727 Router . install ( window . Vue )
2828}
2929
Original file line number Diff line number Diff line change 1+ var util = require ( '../util' )
12var Recognizer = require ( 'route-recognizer' )
23var historyBackends = {
34 abstract : require ( '../history/abstract' ) ,
@@ -64,7 +65,8 @@ function Router (options) {
6465 this . _suppress = ! ! options . suppressTransitionError
6566
6667 // create history object
67- this . mode = this . _abstract
68+ var inBrowser = util . Vue . util . inBrowser
69+ this . mode = ( ! inBrowser || this . _abstract )
6870 ? 'abstract'
6971 : this . _history
7072 ? 'html5'
You can’t perform that action at this time.
0 commit comments