We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 107589b commit c888003Copy full SHA for c888003
packages/shell-chrome/src/detector.js
@@ -8,7 +8,10 @@ window.addEventListener('message', e => {
8
})
9
10
function detect (win) {
11
- setTimeout(() => {
+ let delay = 1000
12
+ let detectRemainingTries = 10
13
+
14
+ function runDetect () {
15
// Method 1: Check Nuxt.js
16
const nuxtDetected = !!(window.__NUXT__ || window.$nuxt)
17
@@ -58,7 +61,20 @@ function detect (win) {
58
61
devtoolsEnabled: Vue.config.devtools,
59
62
vueDetected: true,
60
63
}, '*')
64
+ return
65
+ }
66
67
+ if (detectRemainingTries > 0) {
68
+ detectRemainingTries--
69
+ setTimeout(() => {
70
+ runDetect()
71
+ }, delay)
72
+ delay *= 5
73
}
74
75
76
77
78
}, 100)
79
80
0 commit comments