File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ Vue.prototype.$eventBus = mitt()
35
35
36
36
Vue . config . productionTip = false
37
37
38
+ if ( location . search ) {
39
+ // Vue Router puts the "hash" (#) after the "search" (?) for some reason.
40
+ // But the router fails to read the search parameters because of this?
41
+ // See this rather confusing issue for details:
42
+ // https://github.com/vuejs/vue-router/issues/2125
43
+ // In the mean time we have to hack the path ourselves to reverse the order
44
+ // of the "?" and "#" parts so that the router can work with it.
45
+ location . replace ( location . pathname + location . hash + location . search )
46
+ }
47
+
38
48
/* eslint-disable no-new */
39
49
const app = new Vue ( {
40
50
i18n,
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ Vue.use(Meta)
69
69
70
70
router . beforeResolve ( ( to , from , next ) => {
71
71
NProgress . start ( )
72
+ if ( 'token' in to . query ) {
73
+ // Remove ?token from the query, we only need it on load.
74
+ router . replace ( { query : { } } )
75
+ }
72
76
if ( to . name ) {
73
77
let title
74
78
let workflowName
You can’t perform that action at this time.
0 commit comments