diff options
Diffstat (limited to 'packages/api/src')
| -rw-r--r-- | packages/api/src/app.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/api/src/app.ts b/packages/api/src/app.ts index 24cef24..0dabb0d 100644 --- a/packages/api/src/app.ts +++ b/packages/api/src/app.ts @@ -24,6 +24,17 @@ export const notificationDispatcher = new NotificationDispatcher({ return null; } }, + getTabParentId: (tabId) => { + try { + // `undefined` when the lookup fails (tab not found / DB unavailable) + // so the dispatcher falls back to "treat as top-level" rather than + // silently dropping notifications. + const row = getTab(tabId); + return row ? row.parentTabId : undefined; + } catch { + return undefined; + } + }, }); notificationDispatcher.attachToAgentManager(agentManager); notificationDispatcher.attachToPermissionManager(permissionManager); |
