-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hi,
I suddenly found that if I drop something unexpected to the tree it causes an exception:
main.js:50 SyntaxError: Unexpected token ':', ":::::Posit"... is not valid JSON
at JSON.parse ()
at Proxy.onDropNode (:8890/static/js/webpack:/aipex-5/node_modules/vue3-tree-vue/dist/vue3-tree-vue.esm.js:274:32)
at fn (:8890/static/js/webpack:/aipex-5/node_modules/vue3-tree-vue/dist/vue3-tree-vue.esm.js:459:44)
at fn (:8890/static/js/webpack:/aipex-5/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:1737:12)
at callWithErrorHandling (:8890/static/js/webpack:/aipex-5/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:199:19)
at callWithAsyncErrorHandling (:8890/static/js/webpack:/aipex-5/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:206:17)
at HTMLDivElement.r (:8890/static/js/webpack:/aipex-5/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:730:5)
In my case I caught a card, created with another component and I dropped it to tree.
First I thought that I can solve this by the callback dropValidаtor, but the exception happens before it.
How can I protect the device tree from dropping invalid data?