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