mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
add more checks
This commit is contained in:
parent
478e7dd30a
commit
2efeb8c51e
|
@ -1369,7 +1369,7 @@ export default mixins(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.connection === activeConnection) {
|
if (!info.connection || info.connection === activeConnection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1378,9 +1378,10 @@ export default mixins(
|
||||||
|
|
||||||
enterTimer = setTimeout(() => {
|
enterTimer = setTimeout(() => {
|
||||||
enterTimer = undefined;
|
enterTimer = undefined;
|
||||||
activeConnection = info.connection;
|
if (info.connection) {
|
||||||
CanvasHelpers.showConectionActions(info.connection);
|
activeConnection = info.connection;
|
||||||
|
CanvasHelpers.showConectionActions(info.connection);
|
||||||
|
}
|
||||||
}, 150);
|
}, 150);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -1398,14 +1399,14 @@ export default mixins(
|
||||||
enterTimer = undefined;
|
enterTimer = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeConnection !== info.connection) {
|
if (!info.connection || activeConnection !== info.connection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
exitTimer = setTimeout(() => {
|
exitTimer = setTimeout(() => {
|
||||||
exitTimer = undefined;
|
exitTimer = undefined;
|
||||||
|
|
||||||
if (activeConnection === info.connection) {
|
if (info.connection && activeConnection === info.connection) {
|
||||||
CanvasHelpers.hideConnectionActions(activeConnection);
|
CanvasHelpers.hideConnectionActions(activeConnection);
|
||||||
activeConnection = null;
|
activeConnection = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,7 +380,7 @@ export const getBackgroundStyles = (scale: number, offsetPosition: XYPosition) =
|
||||||
};
|
};
|
||||||
|
|
||||||
export const hideConnectionActions = (connection: Connection | null) => {
|
export const hideConnectionActions = (connection: Connection | null) => {
|
||||||
if (connection) {
|
if (connection && connection.connector) {
|
||||||
hideOverlay(connection, OVERLAY_CONNECTION_ACTIONS_ID);
|
hideOverlay(connection, OVERLAY_CONNECTION_ACTIONS_ID);
|
||||||
showOrHideItemsLabel(connection);
|
showOrHideItemsLabel(connection);
|
||||||
showOrHideMidpointArrow(connection);
|
showOrHideMidpointArrow(connection);
|
||||||
|
@ -388,7 +388,7 @@ export const hideConnectionActions = (connection: Connection | null) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const showConectionActions = (connection: Connection | null) => {
|
export const showConectionActions = (connection: Connection | null) => {
|
||||||
if (connection) {
|
if (connection && connection.connector) {
|
||||||
showOverlay(connection, OVERLAY_CONNECTION_ACTIONS_ID);
|
showOverlay(connection, OVERLAY_CONNECTION_ACTIONS_ID);
|
||||||
hideOverlay(connection, OVERLAY_RUN_ITEMS_ID);
|
hideOverlay(connection, OVERLAY_RUN_ITEMS_ID);
|
||||||
if (!getOverlay(connection, OVERLAY_RUN_ITEMS_ID)) {
|
if (!getOverlay(connection, OVERLAY_RUN_ITEMS_ID)) {
|
||||||
|
|
Loading…
Reference in a new issue