@next-core/brick-utils 2.52.4 → 2.52.6
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.bundle.js +8 -2
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +8 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -20406,6 +20406,9 @@ function removeDeadConditionsByAst(ast, options) {
|
|
|
20406
20406
|
case "MetaMenuItem":
|
|
20407
20407
|
shakeConditionalNodes(node.children, node.raw, "children");
|
|
20408
20408
|
break;
|
|
20409
|
+
case "Context":
|
|
20410
|
+
shakeConditionalNodes(node.onChange, node.raw, "onChange");
|
|
20411
|
+
break;
|
|
20409
20412
|
}
|
|
20410
20413
|
|
|
20411
20414
|
// Remove unreachable context/state.
|
|
@@ -20425,8 +20428,8 @@ function shakeConditionalNodes(conditionalNodes, rawContainer, rawKey) {
|
|
|
20425
20428
|
var removedNodes = [];
|
|
20426
20429
|
if (Array.isArray(conditionalNodes)) {
|
|
20427
20430
|
for (var node of conditionalNodes) {
|
|
20428
|
-
var
|
|
20429
|
-
if ((
|
|
20431
|
+
var _node$else;
|
|
20432
|
+
if (isStoryboardNodeEventHandler(node) && (_node$else = node.else) !== null && _node$else !== void 0 && _node$else.length) {
|
|
20430
20433
|
switch (node.raw.if) {
|
|
20431
20434
|
case false:
|
|
20432
20435
|
node.then = node.else;
|
|
@@ -20463,6 +20466,9 @@ function shakeConditionalNodes(conditionalNodes, rawContainer, rawKey) {
|
|
|
20463
20466
|
}
|
|
20464
20467
|
}
|
|
20465
20468
|
}
|
|
20469
|
+
function isStoryboardNodeEventHandler(node) {
|
|
20470
|
+
return node.type === "EventHandler";
|
|
20471
|
+
}
|
|
20466
20472
|
|
|
20467
20473
|
/**
|
|
20468
20474
|
* Like `removeDeadConditions` but applied to a custom template.
|