@wipco/sdui 0.43.0 → 0.44.0
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/index.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1863,13 +1863,16 @@ function evaluateCalc(calc, resolved, resolve) {
|
|
|
1863
1863
|
/* ── 목록·객체 ── */
|
|
1864
1864
|
case "get": {
|
|
1865
1865
|
const [container, rawKey] = resolved;
|
|
1866
|
-
const key = rawKey == null ? "" : String(rawKey);
|
|
1867
1866
|
if (Array.isArray(container)) {
|
|
1868
|
-
|
|
1867
|
+
if (typeof rawKey !== "number" && (typeof rawKey !== "string" || rawKey.trim() === "")) {
|
|
1868
|
+
return null;
|
|
1869
|
+
}
|
|
1870
|
+
const index = Number(rawKey);
|
|
1869
1871
|
if (!Number.isInteger(index) || index < 0 || index >= container.length) return null;
|
|
1870
1872
|
return container[index] ?? null;
|
|
1871
1873
|
}
|
|
1872
1874
|
if (isPlainObject(container)) {
|
|
1875
|
+
const key = rawKey == null ? "" : String(rawKey);
|
|
1873
1876
|
return Object.hasOwn(container, key) ? container[key] ?? null : null;
|
|
1874
1877
|
}
|
|
1875
1878
|
return null;
|