File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ const getFileItems = async (
190190) : Promise < FileItem [ ] > => {
191191 const result : FileItem [ ] = [ ] ;
192192 for ( const fileExplorer of plugin . getRegisteredFileExplorers ( ) ) {
193- const files = Object . values ( fileExplorer . fileItems ) ;
193+ const files = Object . values ( fileExplorer . fileItems || { } ) ;
194194 for ( const fileItem of files ) {
195195 if ( await isApplicable ( plugin , rule , fileItem . file . path ) ) {
196196 result . push ( fileItem ) ;
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export default class CustomIconRuleSetting extends IconFolderSetting {
180180
181181 const addedPaths : string [ ] = [ ] ;
182182 for ( const fileExplorer of this . plugin . getRegisteredFileExplorers ( ) ) {
183- const files = Object . values ( fileExplorer . fileItems ) ;
183+ const files = Object . values ( fileExplorer . fileItems || { } ) ;
184184 for ( const rule of customRule . getSortedRules ( this . plugin ) ) {
185185 // Removes the icon tabs from all opened files.
186186 this . updateIconTabs ( rule , true , addedPaths ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default class EmojiStyleSetting extends IconFolderSetting {
2929
3030 private updateDOM ( ) : void {
3131 for ( const fileExplorer of this . plugin . getRegisteredFileExplorers ( ) ) {
32- const fileItems = Object . entries ( fileExplorer . fileItems ) ;
32+ const fileItems = Object . entries ( fileExplorer . fileItems || { } ) ;
3333 for ( const [ path , _ ] of fileItems ) {
3434 let iconName = this . plugin . getData ( ) [ path ] as string | undefined | null ;
3535 if ( ! iconName ) {
You can’t perform that action at this time.
0 commit comments