Skip to content

Commit a1daf4b

Browse files
Merge pull request #184 from browserstack/AXE-2707/fix_constants_error
fix: Updated constants.js with serializableErrorProps
2 parents 1d04fca + 0036065 commit a1daf4b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/core/constants.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ const definitions = [
2727

2828
const constants = {
2929
helpUrlBase: 'https://dequeuniversity.com/rules/',
30+
// Size of a grid square in pixels
3031
gridSize: 200,
32+
// At a certain point, looping over an array of elements and using .match on them
33+
// is slower than just running querySelectorAll again.
3134
selectorSimilarFilterLimit: 700,
3235
results: [],
3336
resultGroups: [],
@@ -44,7 +47,15 @@ const constants = {
4447
timeout: 10000
4548
}),
4649
allOrigins: '<unsafe_all_origins>',
47-
sameOrigin: '<same_origin>'
50+
sameOrigin: '<same_origin>',
51+
serializableErrorProps: Object.freeze([
52+
'message',
53+
'stack',
54+
'name',
55+
'code',
56+
'ruleId',
57+
'method'
58+
])
4859
};
4960

5061
definitions.forEach(definition => {

0 commit comments

Comments
 (0)