Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #504 from brandonbk/set-with-section
Browse files Browse the repository at this point in the history
Update setWithSection logic
  • Loading branch information
brandonbk authored Dec 5, 2022
2 parents 0bc5273 + a441483 commit 54fc9c0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ $ const { nativeX: nxConfig } = out.global;
$ const nodes = getAsArray(input, "nodes");
$ const nativeX = getAsObject(input, "nativeX");
$ const withNativeXSection = defaultValue(input.withNativeXSection, true);
$ const setWithSection = (node, nxNode, withNativeXSection = true) => {
if (node.withSection) return true;
if (!withNativeXSection) return false
$ const setWithSection = (node, nxNode, withNativeXSection = true, nodeInput = {}) => {
if (nodeInput.withSection) return true;
if (!withNativeXSection) return false;
return node.id !== nxNode.id;
};
<marko-web-node-list
Expand All @@ -32,7 +32,7 @@ $ const setWithSection = (node, nxNode, withNativeXSection = true) => {
>
<theme-content-node
...input.node
with-section=setWithSection(node, nxNode, withNativeXSection)
with-section=setWithSection(node, nxNode, withNativeXSection, input.node)
node=nxNode
attrs=containerAttrs
link-attrs=linkAttrs
Expand Down

0 comments on commit 54fc9c0

Please sign in to comment.