mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Protect against relation loops (fixes #2072)
This commit is contained in:
@@ -44,6 +44,12 @@ describe('iD.Relation', function () {
|
||||
|
||||
expect(r.extent(graph)).to.eql([[0, 0], [0, 0]])
|
||||
});
|
||||
|
||||
it("does not error on self-referencing relations", function () {
|
||||
var r = iD.Relation();
|
||||
r = r.addMember({id: r.id});
|
||||
expect(r.extent(iD.Graph([r]))).to.eql(iD.geo.Extent())
|
||||
});
|
||||
});
|
||||
|
||||
describe("#geometry", function () {
|
||||
|
||||
Reference in New Issue
Block a user