From 6433d72da6a9d38e5c460e4c641300e29ffa7281 Mon Sep 17 00:00:00 2001 From: Brandon Krigbaum Date: Mon, 5 Dec 2022 11:20:30 -0600 Subject: [PATCH 1/2] Update setWithSection logic --- .../components/blocks/section-feed.marko | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/marko-web-theme-monorail/components/blocks/section-feed.marko b/packages/marko-web-theme-monorail/components/blocks/section-feed.marko index 7a3a61777..3f78f4596 100644 --- a/packages/marko-web-theme-monorail/components/blocks/section-feed.marko +++ b/packages/marko-web-theme-monorail/components/blocks/section-feed.marko @@ -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; }; @@ -54,8 +54,9 @@ $ const setWithSection = (node, nxNode, withNativeXSection = true) => { config=nxConfig > { Date: Mon, 5 Dec 2022 12:11:30 -0600 Subject: [PATCH 2/2] Adjust with-section order --- .../components/blocks/section-feed.marko | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/marko-web-theme-monorail/components/blocks/section-feed.marko b/packages/marko-web-theme-monorail/components/blocks/section-feed.marko index 3f78f4596..9db42ad2d 100644 --- a/packages/marko-web-theme-monorail/components/blocks/section-feed.marko +++ b/packages/marko-web-theme-monorail/components/blocks/section-feed.marko @@ -66,10 +66,10 @@ $ const setWithSection = (node, nxNode, withNativeXSection = true, nodeInput = {