@jetthai/cuora 1.1.455-dev.0 → 1.1.455-dev.1
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/machine/user_sign_up.js +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.455-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.455-dev.0...v1.1.455-dev.1) (2026-08-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **user_sign_up:** 明確輸入判定改用 !== undefined,修復三層解析成為死碼 ([770450e](https://github.com/jetthai/cuora-module/commit/770450e6065d42d497504d2f8630c6740ec1e7c4))
|
|
11
|
+
|
|
5
12
|
### [1.1.455-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.455...v1.1.455-dev.0) (2026-08-04)
|
|
6
13
|
|
|
7
14
|
### [1.1.454-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.453...v1.1.454-dev.0) (2026-07-29)
|
package/package.json
CHANGED
|
@@ -192,11 +192,13 @@ export default function (request) {
|
|
|
192
192
|
const { signUpData, deviceTokenEnable } = context
|
|
193
193
|
const dt = deviceTokenEnable ? await request.config.getDt?.() : undefined
|
|
194
194
|
|
|
195
|
-
// 宿主明確帶入的 affiliateCode
|
|
196
|
-
//
|
|
197
|
-
//
|
|
195
|
+
// 宿主明確帶入的 affiliateCode(註冊表單的代理碼欄位)優先於網址/儲存這類環境值。
|
|
196
|
+
// 判定用 `!== undefined` 而非 hasOwnProperty:上面的 setSignUpId/Phone/Email 是以解構寫入
|
|
197
|
+
// signUpData,宿主沒帶時 key 仍然存在(值為 undefined),hasOwnProperty 會恆為 true、
|
|
198
|
+
// 讓三層解析變成死碼。也不能用 `||`,否則使用者刻意清空送出的空字串會被吃掉、
|
|
199
|
+
// 退回三層解析把剛清掉的舊代理碼從網址撿回來。
|
|
198
200
|
const { affiliateCode: explicitAffiliateCode, ...signUpRest } = signUpData || {}
|
|
199
|
-
const hasExplicitAc =
|
|
201
|
+
const hasExplicitAc = explicitAffiliateCode !== undefined
|
|
200
202
|
const acRead = readParamFromLocation(AC_KEYS)
|
|
201
203
|
const affiliateCode = hasExplicitAc ? normalize(explicitAffiliateCode) : acRead.value
|
|
202
204
|
const messages = {
|