diff --git a/external/@worldbrain/memex-common b/external/@worldbrain/memex-common index b896767811..cd1516e90c 160000 --- a/external/@worldbrain/memex-common +++ b/external/@worldbrain/memex-common @@ -1 +1 @@ -Subproject commit b896767811662edfe362b9f8c6c39a27c2d8d57a +Subproject commit cd1516e90cd8d07a2cd2b1c2dd89fc21dddf7905 diff --git a/src/sidebar/annotations-sidebar/containers/logic.ts b/src/sidebar/annotations-sidebar/containers/logic.ts index 747ba9c4dd..d3e0705624 100644 --- a/src/sidebar/annotations-sidebar/containers/logic.ts +++ b/src/sidebar/annotations-sidebar/containers/logic.ts @@ -897,12 +897,7 @@ export class SidebarContainerLogic extends UILogic< loadState: { $set: 'running' }, }) - if (fullPageUrl == null) { - return - } - this.fullPageUrl = fullPageUrl - - const currentUser = await this.options.authBG.getCurrentUser() + const currentUser = await this.options.authBG?.getCurrentUser() if (currentUser) { this.emitMutation({ currentUserId: { $set: currentUser.id ?? null }, @@ -949,8 +944,13 @@ export class SidebarContainerLogic extends UILogic< renderHighlights: true, }) } - this.syncCachePageListsState(this.fullPageUrl) - await this.setPageActivityState(this.fullPageUrl) + if (fullPageUrl == null) { + return + } + this.fullPageUrl = fullPageUrl + + this.syncCachePageListsState(fullPageUrl) + await this.setPageActivityState(fullPageUrl) if (isUrlPDFViewerUrl(window.location.href, { runtimeAPI })) { const width = SIDEBAR_WIDTH_STORAGE_KEY