π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Fix node store
Smaug6739dfa969f379b8
diff --git a/frontend/app/stores/documents.store.ts b/frontend/app/stores/documents.store.tsindex 752b6bef..2f95b8b6 100644--- a/frontend/app/stores/documents.store.ts+++ b/frontend/app/stores/documents.store.ts@@ -29,14 +29,14 @@ export const useNodesStore = defineStore('nodes', {ressources: state => state.nodes.filter(d => d.role === 4),getNext: state => (node?: Node) => {- const cnodes = state.nodes.filter(d => d.parent_id == node?.parent_id);+ const cnodes = state.nodes.filter(d => d.parent_id == node?.parent_id && d.role === 3);const index = cnodes.findIndex(d => d.id == node?.id);if (index == -1) return;return cnodes[index + 1];},getPrevious: state => (node?: Node) => {- const cnodes = state.nodes.filter(d => d.parent_id == node?.parent_id);+ const cnodes = state.nodes.filter(d => d.parent_id == node?.parent_id && d.role === 3);const index = cnodes.findIndex(d => d.id == node?.id);if (index == -1) return;return cnodes[index - 1];