ananthakumaran / paisa

Paisa – Personal Finance Manager. https://paisa.fyi demo: https://demo.paisa.fyi
https://paisa.fyi
GNU Affero General Public License v3.0
2.24k stars 111 forks source link

Facing various type error issues when viewing my Investments. #154

Closed LEvinson2504 closed 5 months ago

LEvinson2504 commented 5 months ago

Describe your Environment OS: Win 10 Paisa Version: 0.6.3 App Variant: Desktop

Describe the bug Facing following Type errors when viewing investments.

To Reproduce Steps to reproduce the behavior:

  1. Open Paisa App
  2. Go to Expenses > Monthly
  3. See error: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at Function.from () at F (http://wails.localhost/_app/immutable/chunks/each.MG8Yzj7Q.js:1:140) at Object.p (http://wails.localhost/_app/immutable/chunks/LegendCard.Oo1Zx2S0.js:1:2832) at it (http://wails.localhost/_app/immutable/chunks/scheduler.gG-dQSMC.js:1:8451) at nt (http://wails.localhost/_app/immutable/chunks/scheduler.gG-dQSMC.js:1:8104)

    Please report this issue at https://github.com/ananthakumaran/paisa/issues. Closing and reopening the app may help.

Expected behavior View empty charts, and no exceptions.

Screenshots If applicable, add screenshots to help explain your problem.

Journal Empty journal

adityagovindaraj commented 5 months ago

Facing the same problem.

OS: Win 11 Paisa Version: Latest App Variant: Desktop

2024-01-21_17-39

ananthakumaran commented 5 months ago

The last refactor related to legends introduced these errors on a few pages. I will push a fix to this issue soon. The root cause for all the issues is nearly the same, if you have no investment/expense it might fail. You can add a dummy investment (asset) /expense for now to move ahead. The next version should handle empty journals better.