Skip to content

Commit ede5d8a

Browse files
committed
add saveData to slowConnection
1 parent 11533ee commit ede5d8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ const slowConnection =
4242
// @ts-ignore
4343
navigator['connection'] &&
4444
// @ts-ignore
45-
['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1
45+
(['slow-2g', '2g'].indexOf(navigator['connection'].effectiveType) !== -1 ||
46+
// @ts-ignore
47+
navigator['connection'].saveData)
4648

4749
// config
4850
const defaultConfig = {

0 commit comments

Comments
 (0)