I have a series of reversable cards in my deck. I've been getting errors from VS Code itself like
Element with id 1672700247222 is already registered
I put in some debuggers and poked around the code. It appears that I have two cards per note. For example when I query my deck for cards and map {id: cardId, model: modelName, note}, I get the following:
Although all card IDs are unique, the anki plugin uses note IDs, causing collisions.
In particular, the return from the AnkiCardProvider#getChildren() method causes collisions. VS Code calls this method on a TreeDataProvider and consumes the result. So, VS Code itself is throwing the error.
If for example, I change the method to the following:
I have a series of reversable cards in my deck. I've been getting errors from VS Code itself like
I put in some debuggers and poked around the code. It appears that I have two cards per note. For example when I query my deck for cards and map
{id: cardId, model: modelName, note}
, I get the following:Although all card IDs are unique, the anki plugin uses note IDs, causing collisions.
In particular, the return from the
AnkiCardProvider#getChildren()
method causes collisions. VS Code calls this method on a TreeDataProvider and consumes the result. So, VS Code itself is throwing the error.If for example, I change the method to the following:
VS Code doesn't error.
Any thoughts or suggestions?