Skip to content

Commit 6c4237f

Browse files
committed
chore: Adding the option to delay the first check
1 parent a1b856b commit 6c4237f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default function install (Vue, options) {
99

1010
const defaultOptions = {
1111
clearConsoleOnUpdate: false,
12+
delay: 0,
1213
config: {
1314
checks: [{
1415
id: 'color-contrast',
@@ -65,5 +66,7 @@ export default function install (Vue, options) {
6566
}
6667
})
6768

68-
return Vue.nextTick().then(() => checkAndReport(options, document))
69+
setTimeout(() => {
70+
return Vue.nextTick().then(() => checkAndReport(options, document))
71+
}, options.delay)
6972
}

0 commit comments

Comments
 (0)