Merge pull request #748 from yassine-sallemi/fix/visual-editor-drag-error
Some checks failed
Build and Push Docker API Image / build-and-push (push) Has been cancelled
Build and Push Docker Base Image / build-and-push (push) Has been cancelled
Build and Push Docker UI Image / build-and-push (push) Has been cancelled

fix: non-block drop in visual editor
This commit is contained in:
Med Marrouchi 2025-02-14 11:35:26 +01:00 committed by GitHub
commit 63efaf3193
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -519,9 +519,11 @@ const Diagrams = () => {
className="visual-editor" className="visual-editor"
id="visual-editor" id="visual-editor"
onDrop={(event) => { onDrop={(event) => {
const data = JSON.parse( const stormDiagramNode =
event.dataTransfer.getData("storm-diagram-node"), event.dataTransfer.getData("storm-diagram-node");
);
if (!stormDiagramNode) return;
const data = JSON.parse(stormDiagramNode);
if (!data) { if (!data) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console