mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
477 stars 27 forks source link

[Patch] typo in Formula.ts (formulas perpetual updates)? #694

Open SourignaSimmalavong opened 2 weeks ago

SourignaSimmalavong commented 2 weeks ago

Hello,

I was just playing around with MDM code and I found out that, once I updated a Formula, then Obsidian was slowing down because the files (around 11k) containing formulas with a dependency on the firstly changed formula were perpetually updating. I have autocalculation enabled by the way. FYI, the callstack indicates it comes from resolveAndUpdateDVQueriesBasedFields() when the 'dataview:metadata-change' event is triggered (FieldIndex.ts). It seems to be caused by a typo in Formula.ts ("udapte" instead of "update"). Fixing this typo fixes the problem of perpertual reindexing I'm having. Please find enclosed a small patch (the diff is too small to be worth a PR?), I hope this helps 😉

Tested with the tip of master (0.8.7, commit cacd2b4).

Cheers!

formula_patch.txt