Skip to content

Commit 3478e98

Browse files
committed
reset the last notification string each time the console is cleared
1 parent f6da0b6 commit 3478e98

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import axeCore from 'axe-core'
22
import debounce from 'lodash.debounce'
3-
import { checkAndReport, resetCache } from './utils'
3+
import { checkAndReport, resetCache, resetLastNotification } from './utils'
44
import { OPTIONS_DEFAULT } from './constants'
55

66
export default function install (Vue, options) {
@@ -23,6 +23,7 @@ export default function install (Vue, options) {
2323

2424
if (forceClear && options.clearConsoleOnUpdate) {
2525
console.clear()
26+
resetLastNotification()
2627
}
2728
},
2829
debounceAxe: debounce(function () {

src/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export function resetCache () {
5656
cache = {}
5757
}
5858

59+
export function resetLastNotification () {
60+
lastNotification = ''
61+
}
62+
5963
function createDeferred () {
6064
deferred.promise = new Promise((resolve, reject) => {
6165
deferred.resolve = resolve

0 commit comments

Comments
 (0)