madodig / trilium-widget-theme-switch

Trilium widget for changing themes
GNU General Public License v3.0
14 stars 0 forks source link

Error on trilium 0.62.5 because of the api.runOnBackend() #2

Closed dariuszszyc closed 8 months ago

dariuszszyc commented 9 months ago

It appears that Trilium 0.62.5 (self-hosted from docker) throws errors because of the api.runOnBackend It seems to work fine once the above line is replaced (3x in the lib file) with api.runAsyncOnBackendWithManualTransactionHandling

msedge_ywPvI2QY4l

madodig commented 9 months ago

Hi, thanks, I've seen this a week ago when I upgraded my Trilium to 0.62.4. Fixed it, but didn't update the repo. Until I do, I'll leave this open.

For anyone else experiencing this issue, until I release a fixed version, open the 'lib' note (under the ThemeSwitch note) and replace all occurrences of api.runOnBackend with api.runAsyncOnBackendWithManualTransactionHandling If I'm not wrong, 3 lines are affected (8, 15, 22).

madodig commented 8 months ago

Solved in latest release (v1.2.0)