File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ export class DeduplicatingVaultWriter {
140140 }
141141
142142 this . logger . debug ( `Updating file ${ file . path } with new frontmatter` , updatedFrontmatter ) ;
143- for ( const key in updatedFrontmatter . toObject ( ) ) {
144- existingFrontmatter [ key ] = updatedFrontmatter . get ( key ) ;
143+ for ( const [ key , value ] of updatedFrontmatter . entries ( ) ) {
144+ existingFrontmatter [ key ] = value ;
145145 }
146146 } ) ;
147147
@@ -400,8 +400,8 @@ export class DeduplicatingVaultWriter {
400400 private async frontmatterWrite ( existingFile : TFile , frontmatter : Frontmatter ) {
401401 // biome-ignore lint/suspicious/noExplicitAny: Obsidian API exposes this as any
402402 await this . app . fileManager . processFrontMatter ( existingFile , ( existingFrontmatter : any ) => {
403- for ( const key in frontmatter . toObject ( ) ) {
404- existingFrontmatter [ key ] = frontmatter . get ( key ) ;
403+ for ( const [ key , value ] of frontmatter . entries ( ) ) {
404+ existingFrontmatter [ key ] = value ;
405405 }
406406 } ) ;
407407 }
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ export class FrontmatterManager {
142142 await this . fm . processFrontMatter ( file , ( frontmatter ) => {
143143 // Biome doesn't like assing via { ... frontmatter, ...updates }
144144 // Iterate over keys in updates and set them in frontmatter
145- for ( const key in updates . toObject ( ) ) {
146- frontmatter [ key ] = updates . get ( key ) ;
145+ for ( const [ key , value ] of updates . entries ( ) ) {
146+ frontmatter [ key ] = value ;
147147 }
148148 } ) ;
149149 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments