fix(editor): Suppress dev server websocket messages in workflow view (#7808)

This commit is contained in:
Csaba Tuncsik
2023-11-28 17:30:44 +01:00
committed by GitHub
parent 117962d473
commit 685ffd7413
3 changed files with 82 additions and 58 deletions

View File

@@ -136,19 +136,21 @@ const onMouseLeave = () => {
};
const receiveMessage = ({ data }: MessageEvent) => {
try {
const json = JSON.parse(data);
if (json.command === 'n8nReady') {
ready.value = true;
} else if (json.command === 'openNDV') {
nodeViewDetailsOpened.value = true;
} else if (json.command === 'closeNDV') {
nodeViewDetailsOpened.value = false;
} else if (json.command === 'error') {
emit('close');
if (data?.includes('"command"')) {
try {
const json = JSON.parse(data);
if (json.command === 'n8nReady') {
ready.value = true;
} else if (json.command === 'openNDV') {
nodeViewDetailsOpened.value = true;
} else if (json.command === 'closeNDV') {
nodeViewDetailsOpened.value = false;
} else if (json.command === 'error') {
emit('close');
}
} catch (e) {
console.error(e);
}
} catch (e) {
console.error(e);
}
};
const onDocumentScroll = () => {