Skip to content

Commit

Permalink
defensive check
Browse files Browse the repository at this point in the history
  • Loading branch information
tbo47 committed Nov 29, 2024
1 parent 9491fbd commit 8c26a8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dagre/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function predecessorWeights(g) {
* ({x, y, width, height}) if it were pointing at the rectangle's center.
*/
function intersectRect(rect, point) {
if (!rect|| !point) return { x: 0, y: 0 };
var x = rect.x;
var y = rect.y;

Expand Down

0 comments on commit 8c26a8e

Please sign in to comment.