@dongmingzhixiu/vuexir-compiler 0.3.20 → 0.3.21
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/dist/codegen/swiftui.js +1 -1
- package/package.json +1 -1
package/dist/codegen/swiftui.js
CHANGED
|
@@ -515,7 +515,7 @@ function swiftCondExpr(expr, known) {
|
|
|
515
515
|
// 先剥掉字符串字面量,避免把 "success" 之类当成标识符
|
|
516
516
|
const stripped = expr.replace(/'[^']*'|"[^"]*"/g, '""');
|
|
517
517
|
const ids = [...stripped.matchAll(/(?<![.\w$])([A-Za-z_$][\w$]*)/g)].map((m) => m[1]);
|
|
518
|
-
const unknown = ids.filter((id) => !known.has(id) && !['true', 'false', 'Math', 'String', 'Number'].includes(id));
|
|
518
|
+
const unknown = ids.filter((id) => !known.has(id) && !['true', 'false', 'Math', 'String', 'Number', 'vrnTruthy'].includes(id));
|
|
519
519
|
if (unknown.length > 0)
|
|
520
520
|
return 'true';
|
|
521
521
|
}
|