File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 7
7
let cache = { }
8
8
let nodes = [ ]
9
9
let deferred = { }
10
+ let lastNotification = ''
10
11
11
12
export function checkAndReport ( node ) {
12
13
nodes . push ( node )
@@ -15,6 +16,7 @@ export function checkAndReport (node) {
15
16
axeCore . run ( document , { reporter : 'v2' } , ( error , results ) => {
16
17
if ( error ) deferred . reject ( error )
17
18
if ( ! results ) return
19
+ if ( JSON . stringify ( results . violations ) === lastNotification ) return
18
20
19
21
results . violations = results . violations . filter ( result => {
20
22
result . nodes = result . nodes . filter ( node => {
@@ -40,6 +42,8 @@ export function checkAndReport (node) {
40
42
console . groupEnd ( )
41
43
}
42
44
deferred . resolve ( )
45
+
46
+ lastNotification = JSON . stringify ( results . violations )
43
47
} )
44
48
return deferred . promise
45
49
}
You can’t perform that action at this time.
0 commit comments