@gem-sdk/system 2.0.0-dev.173 → 2.0.0-dev.175
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.
|
@@ -77,7 +77,7 @@ const If = (condition, trueResult, falseResult)=>{
|
|
|
77
77
|
return typeof trueResult === 'function' ? trueResult() : trueResult;
|
|
78
78
|
} else {
|
|
79
79
|
// Trả về kết quả sai nếu điều kiện là false
|
|
80
|
-
return falseResult ? typeof falseResult === 'function' ? falseResult() : falseResult :
|
|
80
|
+
return falseResult ? typeof falseResult === 'function' ? falseResult() : falseResult : ''; // Nếu không có falseResult, trả về null
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
const LiquidIf = (c, t, f)=>`{% if ${c} %}${typeof t === 'string' ? t : t()}${f ? `{% else %}${typeof f === 'string' ? f : f?.()}` : ''}{% endif %}`;
|
|
@@ -75,7 +75,7 @@ const If = (condition, trueResult, falseResult)=>{
|
|
|
75
75
|
return typeof trueResult === 'function' ? trueResult() : trueResult;
|
|
76
76
|
} else {
|
|
77
77
|
// Trả về kết quả sai nếu điều kiện là false
|
|
78
|
-
return falseResult ? typeof falseResult === 'function' ? falseResult() : falseResult :
|
|
78
|
+
return falseResult ? typeof falseResult === 'function' ? falseResult() : falseResult : ''; // Nếu không có falseResult, trả về null
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
const LiquidIf = (c, t, f)=>`{% if ${c} %}${typeof t === 'string' ? t : t()}${f ? `{% else %}${typeof f === 'string' ? f : f?.()}` : ''}{% endif %}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/system",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.175",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type-check": "yarn tsc --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
23
|
+
"@gem-sdk/core": "2.0.0-dev.175"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {},
|
|
26
26
|
"module": "dist/esm/index.js",
|