From e68215102c80f43440b19da2634db808856e8eb1 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 22 Jan 2024 15:41:32 -0700 Subject: [PATCH] WIP Et2VfsSelect - fix favorites --- api/js/etemplate/Et2Vfs/Et2VfsSelect.ts | 4 ++-- api/src/Etemplate/Widget/Vfs.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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);