refactor(edge-utils): check center params for undefined

This commit is contained in:
moklick
2020-09-27 22:28:43 +02:00
parent b7e27094bb
commit 993055e08b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ export function getSmoothStepPath({
let firstCornerPath = null;
let secondCornerPath = null;
const cX = centerX ? centerX : _centerX;
const cY = centerY ? centerY : _centerY;
const cX = typeof centerX !== 'undefined' ? centerX : _centerX;
const cY = typeof centerY !== 'undefined' ? centerY : _centerY;
// default case: source and target positions are top or bottom
if (sourceX <= targetX) {