Skip to content

Commit 0dffc97

Browse files
authored
ENG-367 - Initial Schema Load/Display Bug (#288)
* Refactor initialization sequence in index.ts to use await for asynchronous functions, ensuring proper execution order of discourse nodes and config tree refresh. * Update version to 0.14.2 in package.json and package-lock.json for roam
1 parent 9af2ee7 commit 0dffc97

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

apps/roam/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "roam",
3-
"version": "0.14.1",
3+
"version": "0.14.2",
44
"description": "Discourse Graph Plugin for roamresearch.com",
55
"scripts": {
66
"postinstall": "patch-package",

apps/roam/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,12 @@ export default runExtension(async (onloadArgs) => {
8585
timeout: 500,
8686
});
8787
}
88-
89-
initializeDiscourseNodes();
90-
refreshConfigTree();
9188
addGraphViewNodeStyling();
9289
registerCommandPaletteCommands(onloadArgs);
9390
createSettingsPanel(onloadArgs);
9491
registerSmartBlock(onloadArgs);
9592
setQueryPages(onloadArgs);
93+
9694
const style = addStyle(styles);
9795
const discourseGraphStyle = addStyle(discourseGraphStyles);
9896
const settingsStyle = addStyle(settingsStyles);
@@ -111,6 +109,9 @@ export default runExtension(async (onloadArgs) => {
111109
document.addEventListener("input", discourseNodeSearchTriggerListener);
112110
document.addEventListener("selectionchange", nodeCreationPopoverListener);
113111

112+
await initializeDiscourseNodes();
113+
refreshConfigTree();
114+
114115
const { extensionAPI } = onloadArgs;
115116
window.roamjs.extension.queryBuilder = {
116117
runQuery: (parentUid: string) =>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)