Skip to content

Commit 9ab6e2a

Browse files
committed
fix user explicitly setting config.devtools (fix vuejs#2593)
1 parent 32b33d4 commit 9ab6e2a

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/index.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ export default Vue
1111

1212
// devtools global hook
1313
/* istanbul ignore next */
14-
if (config.devtools) {
15-
if (devtools) {
16-
devtools.emit('init', Vue)
17-
} else if (
18-
process.env.NODE_ENV !== 'production' &&
19-
inBrowser && /Chrome\/\d+/.test(window.navigator.userAgent)
20-
) {
21-
console.log(
22-
'Download the Vue Devtools for a better development experience:\n' +
23-
'https://github.com/vuejs/vue-devtools'
24-
)
14+
setTimeout(() => {
15+
if (config.devtools) {
16+
if (devtools) {
17+
devtools.emit('init', Vue)
18+
} else if (
19+
process.env.NODE_ENV !== 'production' &&
20+
inBrowser && /Chrome\/\d+/.test(window.navigator.userAgent)
21+
) {
22+
console.log(
23+
'Download the Vue Devtools for a better development experience:\n' +
24+
'https://github.com/vuejs/vue-devtools'
25+
)
26+
}
2527
}
26-
}
28+
}, 0)

0 commit comments

Comments
 (0)