In some cases, the Anki export is mistakenly reported as successful, when nothing is actually imported into Anki. Even if the documentation says Anki Connect should return null, in fact it's returning [null] (Array with a single value: null). The nullish operator doesn't distinguish and incorrectly says that 1 card was exported to Anki (when it's not).
The checks I added fix this subtle bug, and report the user if the export was unsuccessful.
Btw thank you for the plugin: it really is a timesaver!
In some cases, the Anki export is mistakenly reported as successful, when nothing is actually imported into Anki. Even if the documentation says Anki Connect should return
null
, in fact it's returning[null]
(Array with a single value: null). The nullish operator doesn't distinguish and incorrectly says that 1 card was exported to Anki (when it's not).The checks I added fix this subtle bug, and report the user if the export was unsuccessful.
Btw thank you for the plugin: it really is a timesaver!