@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.
Files changed (2) hide show
  1. package/dist/index.js +5 -2
  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
- const index = Number(key);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipco/sdui",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
5
5
  "keywords": [
6
6
  "sdui",