Skip to content

Commit 679550e

Browse files
v3.13.4 - fix file tree crash on malformed file entries
Add null guard to folderMetrics filter in useVaultTree to prevent 'Cannot read properties of undefined (reading startsWith)' crash when deferredFiles contains entries with undefined name/relativePath. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 172b5f0 commit 679550e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to BluePLM will be documented in this file.
44

5+
## [3.13.4] - 2026-02-09
6+
7+
### Fixed
8+
- **File tree crash on malformed file entries**: Fixed crash in the vault tree where `folderMetrics` computation would throw `Cannot read properties of undefined (reading 'startsWith')` if a file entry had an undefined `name` or `relativePath`. Added the same null guard that already existed in the tree builder
9+
10+
---
11+
512
## [3.13.3] - 2026-02-09
613

714
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blue-plm",
3-
"version": "3.13.3",
3+
"version": "3.13.4",
44
"description": "Open-source Product Lifecycle Management",
55
"main": "dist-electron/main.js",
66
"scripts": {

src/features/source/explorer/file-tree/hooks/useVaultTree.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export function useVaultTree() {
220220
// Get all non-directory files (optionally excluding SolidWorks temp files)
221221
// Uses deferredFiles to allow React to batch updates and yield to user input
222222
const allNonDirFiles = deferredFiles.filter(f => {
223+
if (!f || !f.relativePath || !f.name) return false
223224
if (f.isDirectory) return false
224225
if (hideSolidworksTempFiles && f.name.startsWith('~$')) return false
225226
return true

0 commit comments

Comments
 (0)