Skip to content

Commit

Permalink
fix(files): catch race condition in FilesWorkspaceHeader init
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <[email protected]>

[skip ci]
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Dec 5, 2024
1 parent 3bcb8e1 commit ab71bf1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/helpers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import axios from '@nextcloud/axios'

import TextSvg from '@mdi/svg/svg/text.svg?raw'

import { openMimetypes } from './mime.js'
import store from '../store/index.js'

const FILE_ACTION_IDENTIFIER = 'Edit with text app'

const registerFileCreate = () => {
Expand Down Expand Up @@ -213,6 +216,11 @@ export const FilesWorkspaceHeader = new Header({
updated(folder, view) {
newWorkspaceCreated = false

if (!vm) {
console.warn('No vue instance found for FilesWorkspaceHeader')
return
}

// Currently there is not much use in updating the vue instance props since render is called on every folder change
// removing the rendered element from the DOM
// This is only relevant if switching to a folder that has no content as then the render function is not called
Expand Down

0 comments on commit ab71bf1

Please sign in to comment.