Skip to content

Commit a1ce922

Browse files
committed
Fix: use backedBy 'user' for initial discourse nodes in block props
initSingleDiscourseNode was writing backedBy: "default" which caused nodes to be filtered out of the settings panel when the flag is ON. Also fixes up existing graphs that already stored the wrong value.
1 parent b7d26df commit a1ce922

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • apps/roam/src/components/settings/utils

apps/roam/src/components/settings/utils/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,12 @@ const initSingleDiscourseNode = async (
147147
tag: node.tag || "",
148148
graphOverview: node.graphOverview ?? false,
149149
canvasSettings: node.canvasSettings || {},
150-
backedBy: "default",
150+
backedBy: "user",
151151
});
152152

153153
setBlockProps(pageUid, nodeData, false);
154+
} else if (existingProps && existingProps["backedBy"] === "default") {
155+
setBlockProps(pageUid, { ...existingProps, backedBy: "user" }, false);
154156
}
155157

156158
return { label: node.text, pageUid };

0 commit comments

Comments
 (0)