Created
October 12, 2021 22:46
-
-
Save isaacs/fa2b4ca323aa1886af77d0b7991c8ef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/can-place-dep.js b/lib/can-place-dep.js | |
index 6be59093..e4eba7ac 100644 | |
--- a/lib/can-place-dep.js | |
+++ b/lib/can-place-dep.js | |
@@ -145,7 +145,9 @@ class CanPlaceDep { | |
return CONFLICT | |
} | |
- if (targetEdge && !dep.satisfies(targetEdge) && targetEdge !== this.edge) { | |
+ // skip this test if there's a current node, because we might be able | |
+ // to dedupe against it anyway | |
+ if (!current && targetEdge && !dep.satisfies(targetEdge) && targetEdge !== this.edge) { | |
return CONFLICT | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment