Fix false positive for impossible oneway when connected way is circular

This commit is contained in:
Quincy Morgan
2019-05-02 12:18:21 -07:00
parent 752bc72e7c
commit 0a71fd1e4f
+3 -1
View File
@@ -85,7 +85,9 @@ export function validationImpossibleOneway() {
if (attachedOneways.length) {
var connectedEndpointsOkay = attachedOneways.some(function(attachedOneway) {
return (isFirst ? attachedOneway.first() : attachedOneway.last()) !== nodeID;
if ((isFirst ? attachedOneway.first() : attachedOneway.last()) !== nodeID) return true;
if (nodeOccursMoreThanOnce(attachedOneway, nodeID)) return true;
return false;
});
if (connectedEndpointsOkay) return [];
}