yakuza0 2.23.8 → 2.23.9-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.23.8",
3
+ "version": "2.23.9-beta.2",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -97,31 +97,33 @@ export default async (ctx, inject) => {
97
97
  url += '#' + options.hash
98
98
  }
99
99
 
100
- if (!checkServer()) {
101
- if (typeof options.replace === 'boolean' && options.replace) {
102
- window.location.replace(url);
103
- // if (options.target === '_blank') {
104
- // window.open(url, options.target, options.specs, options.replace)
105
- // } else {
106
- // window.location.replace(url)
107
- // }
108
- } else {
109
- if (isOuter || options.target !== '_self' || options.specs) {
110
- if (_.startsWith(url, '/') && !_.startsWith(url, '//')) {
111
- url = _.bothAddFix($yk.appConf.server.basePath, '/') + _.trimStart(url, '/')
112
- }
113
-
114
- window.open(url, options.target, options.specs)
100
+ if (typeof url === 'string') {
101
+ if (!checkServer()) {
102
+ if (typeof options.replace === 'boolean' && options.replace) {
103
+ window.location.replace(url);
104
+ // if (options.target === '_blank') {
105
+ // window.open(url, options.target, options.specs, options.replace)
106
+ // } else {
107
+ // window.location.replace(url)
108
+ // }
115
109
  } else {
116
- redirect(url)
110
+ if (isOuter || options.target !== '_self' || options.specs) {
111
+ if (_.startsWith(url, '/') && !_.startsWith(url, '//')) {
112
+ url = _.bothAddFix($yk.appConf.server.basePath, '/') + _.trimStart(url, '/')
113
+ }
114
+
115
+ window.open(url, options.target, options.specs)
116
+ } else {
117
+ redirect(url)
118
+ }
117
119
  }
120
+ } else {
121
+ const q = jsUrl('?', url) || {};
122
+ if (route.query.ticket || route.query.__isc) {
123
+ q.__isc = route.query.ticket ? md5(route.query.ticket).substring(0, 6) : route.query.__isc
124
+ }
125
+ redirect(url, q)
118
126
  }
119
- } else {
120
- const q = jsUrl('?', url) || {};
121
- if (route.query.ticket || route.query.__isc) {
122
- q.__isc = route.query.ticket ? md5(route.query.ticket).substring(0, 6) : route.query.__isc
123
- }
124
- redirect(url, q)
125
127
  }
126
128
  }
127
129