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

Commit

Permalink
Update setWithSection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonbk committed Dec 5, 2022
1 parent 26d6ca5 commit 6433d72
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ $ const withSection = defaultValue(input.withSection, true);
$ const { nativeX: nxConfig } = out.global;
$ 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;
};
Expand Down Expand Up @@ -54,8 +54,9 @@ $ const setWithSection = (node, nxNode, withNativeXSection = true) => {
config=nxConfig
>
<theme-section-feed-content-node
...input.node
display-image=input.displayImage
with-section=setWithSection(node, nxNode, withNativeXSection)
with-section=setWithSection(node, nxNode, withNativeXSection, input.node)
lazyload=lazyload
node=nxNode
attrs=containerAttrs
Expand All @@ -65,6 +66,7 @@ $ const setWithSection = (node, nxNode, withNativeXSection = true) => {
</if>
<else>
<theme-section-feed-content-node
...input.node
node=node
display-image=input.displayImage
with-section=withSection
Expand Down

0 comments on commit 6433d72

Please sign in to comment.