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 ee94643 commit b31b2a1Copy full SHA for b31b2a1
src/index.js
@@ -29,9 +29,10 @@ export default (Vue, { componentName = 'RouterLink' } = {}) => {
29
}
30
},
31
mounted() {
32
+ const conn = navigator.connection
33
const canPrefetch =
- !navigator.connection ||
34
- navigator.connection.effectiveType.indexOf('2g') === -1
+ !conn ||
35
+ ((conn.effectiveType || '').indexOf('2g') === -1 && !conn.saveData)
36
if (this.prefetch && observer && canPrefetch) {
37
setTimeout(() => {
38
this.observe()
0 commit comments