File tree Expand file tree Collapse file tree
apps/roam/src/components/settings/utils Expand file tree Collapse file tree Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments