fix: Avoid duplicate navigation items - #2094
Conversation
|
Is there a reason why/place where we try to set duplicate tables in first place? |
jancborchardt
left a comment
There was a problem hiding this comment.
Ran into this last week as well. Didn鈥檛 test, but thanks for fixing it!
|
Hi @enjeck and @blizzz The issue is caused in the store.js, in the functions loadContextTable() and loadContextView(). const view = this.views.find(view => view.id === id)
if (view) {
return true
}The issue is, on page reload, the variable id is a string, not a integer anymore, so it is not able to find the view and duplicates it here with tables.push() and views.push(). I have not looked into why this happens yet or what change caused it, but this duplication could be prevented by making sure the id for searching a view or table is a integer, with e. g. parseInt(). |
Simpler fix, thanks! |
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
c8e87c3 to
f53c662
Compare
To reproduce problem:
Problem also reported at Tables contributor week 2025 Brainstorming outcomes聽#2089
This PR fixes it by just removing duplicate entries in the store