tutuca 0.9.96 → 0.9.97
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/tutuca-cli.js +3 -2
- package/dist/tutuca-dev.ext.js +4 -2
- package/dist/tutuca-dev.js +4 -2
- package/dist/tutuca-dev.min.js +1 -1
- package/dist/tutuca-extra.ext.js +4 -2
- package/dist/tutuca-extra.js +4 -2
- package/dist/tutuca-extra.min.js +1 -1
- package/dist/tutuca.ext.js +4 -2
- package/dist/tutuca.js +4 -2
- package/dist/tutuca.min.js +1 -1
- package/package.json +1 -1
- package/skill/tutuca-source/tutuca.ext.js +4 -2
package/dist/tutuca-extra.ext.js
CHANGED
|
@@ -1224,6 +1224,8 @@ class RequestHandler {
|
|
|
1224
1224
|
import { isIndexed, isKeyed } from "immutable";
|
|
1225
1225
|
|
|
1226
1226
|
// src/cache.js
|
|
1227
|
+
var isWeakKey = (k) => k !== null && (typeof k === "object" || typeof k === "function");
|
|
1228
|
+
|
|
1227
1229
|
class NullDomCache {
|
|
1228
1230
|
get(_keys, _cacheKey) {}
|
|
1229
1231
|
set(_keys, _cacheKey, _v) {}
|
|
@@ -1267,7 +1269,7 @@ class WeakMapDomCache {
|
|
|
1267
1269
|
const key = keys[i];
|
|
1268
1270
|
let next = cur.get(key);
|
|
1269
1271
|
if (!next) {
|
|
1270
|
-
if (
|
|
1272
|
+
if (!isWeakKey(key)) {
|
|
1271
1273
|
this.badKey += 1;
|
|
1272
1274
|
return;
|
|
1273
1275
|
}
|
|
@@ -1280,7 +1282,7 @@ class WeakMapDomCache {
|
|
|
1280
1282
|
const leaf = cur.get(lastKey);
|
|
1281
1283
|
if (leaf)
|
|
1282
1284
|
leaf[cacheKey] = v;
|
|
1283
|
-
else if (
|
|
1285
|
+
else if (isWeakKey(lastKey))
|
|
1284
1286
|
cur.set(lastKey, { [cacheKey]: v });
|
|
1285
1287
|
else
|
|
1286
1288
|
this.badKey += 1;
|
package/dist/tutuca-extra.js
CHANGED
|
@@ -5594,6 +5594,8 @@ class RequestHandler {
|
|
|
5594
5594
|
}
|
|
5595
5595
|
|
|
5596
5596
|
// src/cache.js
|
|
5597
|
+
var isWeakKey = (k) => k !== null && (typeof k === "object" || typeof k === "function");
|
|
5598
|
+
|
|
5597
5599
|
class NullDomCache {
|
|
5598
5600
|
get(_keys, _cacheKey) {}
|
|
5599
5601
|
set(_keys, _cacheKey, _v) {}
|
|
@@ -5637,7 +5639,7 @@ class WeakMapDomCache {
|
|
|
5637
5639
|
const key = keys[i];
|
|
5638
5640
|
let next = cur.get(key);
|
|
5639
5641
|
if (!next) {
|
|
5640
|
-
if (
|
|
5642
|
+
if (!isWeakKey(key)) {
|
|
5641
5643
|
this.badKey += 1;
|
|
5642
5644
|
return;
|
|
5643
5645
|
}
|
|
@@ -5650,7 +5652,7 @@ class WeakMapDomCache {
|
|
|
5650
5652
|
const leaf = cur.get(lastKey);
|
|
5651
5653
|
if (leaf)
|
|
5652
5654
|
leaf[cacheKey] = v;
|
|
5653
|
-
else if (
|
|
5655
|
+
else if (isWeakKey(lastKey))
|
|
5654
5656
|
cur.set(lastKey, { [cacheKey]: v });
|
|
5655
5657
|
else
|
|
5656
5658
|
this.badKey += 1;
|