@jetthai/cuora 1.0.174 → 1.0.176

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": "@jetthai/cuora",
3
- "version": "1.0.174",
3
+ "version": "1.0.176",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -150,22 +150,27 @@ export default function (request) {
150
150
  }
151
151
  }),
152
152
  setAgent: assign((context, event) => {
153
- let urlParams = new URLSearchParams(window.location.search)
154
- const channel = urlParams.get('channel') || cookies.get('channel') || defaultChannel || 'official'
155
- const subchannel = urlParams.get('subchannel') || cookies.get('subchannel') || defaultSubchannel || 'pwa'
153
+ if (window.CC_JSB === true) {
154
+ // is cocos native app
155
+ return
156
+ } else {
157
+ let urlParams = new URLSearchParams(window.location.search)
158
+ const channel = urlParams.get('channel') || cookies.get('channel') || defaultChannel || 'official'
159
+ const subchannel = urlParams.get('subchannel') || cookies.get('subchannel') || defaultSubchannel || 'pwa'
156
160
 
157
- cookies.set('channel', channel, {
158
- path: '/',
159
- maxAge: 60 * 60 * 24 * 7,
160
- })
161
- cookies.set('subchannel', subchannel, {
162
- path: '/',
163
- maxAge: 60 * 60 * 24 * 7,
164
- })
161
+ cookies.set('channel', channel, {
162
+ path: '/',
163
+ maxAge: 60 * 60 * 24 * 7,
164
+ })
165
+ cookies.set('subchannel', subchannel, {
166
+ path: '/',
167
+ maxAge: 60 * 60 * 24 * 7,
168
+ })
165
169
 
166
- return {
167
- channel,
168
- subchannel,
170
+ return {
171
+ channel,
172
+ subchannel,
173
+ }
169
174
  }
170
175
  }),
171
176
  setFeeds: assign((context, event) => {