Skip to content
Prev Previous commit
chore(cleanup): no need for reactive baseVersionEtag
We store it to make sure we are reconnecting to the same editing session.
So the whole point is that it does not change in between.

Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Aug 18, 2025
commit b3e511ca3a325405f12af0d43fc2b1d377444d9d
6 changes: 3 additions & 3 deletions src/composables/useConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function provideConnection(props: {
initialSession?: InitialData
shareToken?: string
}) {
const baseVersionEtag = shallowRef<string | undefined>(undefined)
let baseVersionEtag: string | undefined
const connection = shallowRef<Connection | undefined>(undefined)
const openData = shallowRef<OpenData | undefined>(undefined)
const openConnection = async () => {
Expand All @@ -60,9 +60,9 @@ export function provideConnection(props: {
guestName,
token: props.shareToken,
filePath: props.relativePath,
baseVersionEtag: baseVersionEtag.value,
baseVersionEtag,
}))
baseVersionEtag.value = data.document.baseVersionEtag
baseVersionEtag = data.document.baseVersionEtag
connection.value = opened
openData.value = data
return data
Expand Down
Loading