x-runtime-lib 0.8.175 → 0.8.176
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 +2 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,22 +365,12 @@ function _t(t, n, e) {
|
|
|
365
365
|
}
|
|
366
366
|
const Qo = async (t, n, e, o) => {
|
|
367
367
|
const i = await t.getElementProperty(n, e);
|
|
368
|
-
|
|
369
|
-
if (typeof i != "string")
|
|
370
|
-
throw new Error("unexpected value type");
|
|
371
|
-
return JSON.parse(i);
|
|
372
|
-
} else
|
|
373
|
-
return i;
|
|
368
|
+
return o && typeof i == "string" ? JSON.parse(i) : i;
|
|
374
369
|
}, es = async (t, n, e, o, i) => {
|
|
375
370
|
i && typeof o == "object" && (o = JSON.stringify(o, null, 2)), await t.setElementProperty(n, e, o);
|
|
376
371
|
}, ts = async (t, n, e) => {
|
|
377
372
|
const o = ze(t, n);
|
|
378
|
-
|
|
379
|
-
if (typeof o != "string")
|
|
380
|
-
throw new Error("unexpected value type");
|
|
381
|
-
return JSON.parse(o);
|
|
382
|
-
} else
|
|
383
|
-
return o;
|
|
373
|
+
return e && typeof o == "string" ? JSON.parse(o) : o;
|
|
384
374
|
}, ns = async (t, n, e, o) => {
|
|
385
375
|
o && typeof e == "object" && (e = JSON.stringify(e, null, 2)), xn(t, n, e);
|
|
386
376
|
};
|