File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export default function (Vue) {
5
5
// override Vue's init and destroy process to keep track of router instances
6
6
const init = Vue . prototype . _init
7
7
Vue . prototype . _init = function ( options ) {
8
+ options = options || { }
8
9
const root = options . _parent || options . parent || this
9
10
const route = root . $route
10
11
if ( route ) {
Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ describe('Core', function () {
11
11
spyOn ( window , 'scrollTo' )
12
12
} )
13
13
14
+ it ( 'call Vue constructor with no arguments' , function ( ) {
15
+ /* eslint-disable no-new */
16
+ new Vue ( )
17
+ /* eslint-enable no-new */
18
+ } )
19
+
14
20
it ( 'matching views' , function ( done ) {
15
21
router = new Router ( { abstract : true } )
16
22
router . map ( {
You can’t perform that action at this time.
0 commit comments