From a8a8c636b8ee3b536c05653decd71856777c7a5a Mon Sep 17 00:00:00 2001 From: Morgan Harris Date: Tue, 23 Nov 2021 13:15:21 +1100 Subject: Add regression test for #1235 This is literally all you have to do to break this function... just have one single other group in your document. --- spec/spec/elements/Element.js | 1 + 1 file changed, 1 insertion(+) (limited to 'spec') diff --git a/spec/spec/elements/Element.js b/spec/spec/elements/Element.js index 38b862f..70c3a52 100644 --- a/spec/spec/elements/Element.js +++ b/spec/spec/elements/Element.js @@ -165,6 +165,7 @@ describe('Element.js', function () { describe('parents()', () => { it('returns array of parents until the passed element or root svg', () => { const canvas = SVG().addTo(container) + const groupA = canvas.group().addClass('test') const group1 = canvas.group().addClass('test') const group2 = group1.group() const group3 = group2.group() -- cgit v1.2.3