Skip to content

Commit 4e226c1

Browse files
authored
chore(release): 4.10.2 (#4619)
### Bug Fixes - **get-ancestry:** don't error when there is no parent ([#4617](#4617)) ([6c07102](6c07102))
2 parents b581695 + 98ca0cd commit 4e226c1

File tree

7 files changed

+20
-5
lines changed

7 files changed

+20
-5
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [4.10.2](https://github.com/dequelabs/axe-core/compare/v4.10.1...v4.10.2) (2024-10-21)
6+
7+
### Bug Fixes
8+
9+
- **get-ancestry:** don't error when there is no parent ([#4617](https://github.com/dequelabs/axe-core/issues/4617)) ([6c07102](https://github.com/dequelabs/axe-core/commit/6c07102b1d29145b8dc5f1d96229f3d0b8b38068))
10+
511
### [4.10.1](https://github.com/dequelabs/axe-core/compare/v4.10.0...v4.10.1) (2024-10-16)
612

713
### Bug Fixes

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "axe-core",
3-
"version": "4.10.1",
3+
"version": "4.10.2",
44
"deprecated": true,
55
"contributors": [
66
{

lib/core/utils/get-ancestry.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function generateAncestry(node) {
99
if (
1010
nodeName !== 'head' &&
1111
nodeName !== 'body' &&
12-
parentNode.children.length > 1
12+
parentNode?.children.length > 1
1313
) {
1414
const index = Array.prototype.indexOf.call(parentNode.children, node) + 1;
1515
nthChild = `:nth-child(${index})`;

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "axe-core",
33
"description": "Accessibility engine for automated Web UI testing",
4-
"version": "4.10.1",
4+
"version": "4.10.2",
55
"license": "MPL-2.0",
66
"engines": {
77
"node": ">=4"

sri-history.json

+4
Original file line numberDiff line numberDiff line change
@@ -386,5 +386,9 @@
386386
"4.10.1": {
387387
"axe.js": "sha256-KQDnBck/AyiC+OE3x0AJ/EQYykYTnH+1z7punr4Xc0c=",
388388
"axe.min.js": "sha256-OBXf33U9n+qCj0mI9MLkiVyC1nCzabDnmopjyuv1gZ4="
389+
},
390+
"4.10.2": {
391+
"axe.js": "sha256-+gZL/deLqt1La/rK9St/UzNzWa4co71yGT5I07FuZuE=",
392+
"axe.min.js": "sha256-tRHNnewBx29LKtFyO2a22zfUwutO0ZkHbhgp2e57deM="
389393
}
390394
}

test/core/utils/get-ancestry.js

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ describe('axe.utils.getAncestry', () => {
2626
assert.isNotNull(document.querySelector(sel1));
2727
});
2828

29+
it('should not throw when there is no parent', () => {
30+
const node = document.createElement('section');
31+
assert.doesNotThrow(() => axe.utils.getAncestry(node));
32+
});
33+
2934
it('generates selectors of nested shadow trees', () => {
3035
const node = document.createElement('section');
3136
fixture.appendChild(node);

0 commit comments

Comments
 (0)