File tree Expand file tree Collapse file tree 5 files changed +426
-359
lines changed Expand file tree Collapse file tree 5 files changed +426
-359
lines changed Original file line number Diff line number Diff line change 1+ declare var document: Document ;
2+
13declare module 'path-to-regexp' {
24 declare var exports: {
35 ( path : string , keys : Array < ?{ name : string } > ) : RegExp ;
Original file line number Diff line number Diff line change 5353 "eslint" : " ^3.0.1" ,
5454 "eslint-config-vue" : " ^2.0.1" ,
5555 "eslint-plugin-flow-vars" : " ^0.5.0" ,
56- "eslint-plugin-vue" : " ^1 .0.0 " ,
56+ "eslint-plugin-vue" : " ^2 .0.1 " ,
5757 "express" : " ^4.14.0" ,
5858 "express-urlrewrite" : " ^1.2.0" ,
59- "flow-bin" : " ^0.33 .0" ,
59+ "flow-bin" : " ^0.40 .0" ,
6060 "gitbook-plugin-edit-link" : " ^2.0.2" ,
61- "gitbook-plugin-github" : " ^2 .0.0" ,
61+ "gitbook-plugin-github" : " ^3 .0.0" ,
6262 "jasmine" : " 2.5.3" ,
6363 "nightwatch" : " ^0.9.5" ,
6464 "nightwatch-helpers" : " ^1.0.0" ,
7575 "typescript" : " ^2.0.3" ,
7676 "uglify-js" : " ^2.7.0" ,
7777 "vue" : " ^2.1.0" ,
78- "vue-loader" : " ^10 .0.0" ,
78+ "vue-loader" : " ^11 .0.0" ,
7979 "vue-template-compiler" : " ^2.1.0" ,
8080 "webpack" : " ^2.2.0" ,
8181 "webpack-dev-middleware" : " ^1.9.0"
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ export class History {
1717 readyCbs: Array < Function > ;
1818
1919 // implemented by sub-classes
20- go: ( n : number ) => void ;
21- push: ( loc : RawLocation ) => void ;
22- replace: ( loc : RawLocation ) => void ;
23- ensureURL: ( push ? : boolean ) => void ;
24- getCurrentLocation: ( ) => string ;
20+ + go : ( n : number ) = > void ;
21+ + push : ( loc : RawLocation ) = > void ;
22+ + replace : ( loc : RawLocation ) = > void ;
23+ + ensureURL : ( push ? : boolean ) = > void ;
24+ + getCurrentLocation : ( ) = > string ;
2525
2626 constructor ( router : Router , base : ?string ) {
2727 this . router = router
@@ -150,7 +150,7 @@ function normalizeBase (base: ?string): string {
150150 if ( inBrowser ) {
151151 // respect <base> tag
152152 const baseEl = document . querySelector ( 'base' )
153- base = baseEl ? baseEl . getAttribute ( 'href' ) : '/'
153+ base = ( baseEl && baseEl . getAttribute ( 'href' ) ) || '/'
154154 } else {
155155 base = '/'
156156 }
Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ function getScrollPosition (): ?Object {
7777}
7878
7979function getElementPosition ( el : Element ) : Object {
80- const docRect = document . documentElement . getBoundingClientRect ( )
80+ const docEl : any = document . documentElement
81+ const docRect = docEl . getBoundingClientRect ( )
8182 const elRect = el . getBoundingClientRect ( )
8283 return {
8384 x : elRect . left - docRect . left ,
You can’t perform that action at this time.
0 commit comments