diff --git a/api/js/etemplate/Et2Vfs/Et2VfsSelect.ts b/api/js/etemplate/Et2Vfs/Et2VfsSelect.ts index 63123cfd11..71accba77d 100644 --- a/api/js/etemplate/Et2Vfs/Et2VfsSelect.ts +++ b/api/js/etemplate/Et2Vfs/Et2VfsSelect.ts @@ -339,8 +339,8 @@ export class Et2VfsSelect extends Et2InputWidget(LitElement) implements SearchMi processRemoteResults(results) : FileInfo[] { - this.helpText = results.message ?? ""; - this._fileList = results.files ?? []; + this.helpText = results?.message ?? ""; + this._fileList = results?.files ?? []; return this._fileList; } diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index f7b7084b95..ba83299661 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -641,6 +641,7 @@ class Vfs extends File continue; } $name = $path['name'] ?? Api\Vfs::basename($path); + $path = $path['path'] ?? $path; $is_dir = $path['isDir'] ?? Api\Vfs::is_dir($path); $mime = $path['mime'] ?? Api\Vfs::mime_content_type($path);