Skip to content

Commit 36fe060

Browse files
committed
address devin review from accessors pr
1 parent e39022a commit 36fe060

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,18 +470,19 @@ export const setDiscourseNodeSetting = (
470470
}
471471

472472
let pageUid = nodeType;
473-
const blockProps = getBlockPropsByUid(pageUid, []);
473+
let blockProps = getBlockPropsByUid(pageUid, []);
474474

475475
if (!blockProps || Object.keys(blockProps).length === 0) {
476476
const lookedUpUid = getPageUidByPageTitle(
477477
`${DISCOURSE_NODE_PAGE_PREFIX}${nodeType}`,
478478
);
479479
if (lookedUpUid) {
480480
pageUid = lookedUpUid;
481+
blockProps = getBlockPropsByUid(pageUid, []);
481482
}
482483
}
483484

484-
if (!pageUid) {
485+
if (!blockProps || Object.keys(blockProps).length === 0) {
485486
internalError({
486487
error: `setDiscourseNodeSetting - could not find page for: ${nodeType}`,
487488
type: "DG Accessor",

0 commit comments

Comments
 (0)