HubSpot / offline

Automatically display online/offline indication to your users

Home Page:http://github.hubspot.com/offline/docs/welcome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Offline.check().offline is always false

jjalonso opened this issue · comments

MAC 10.11.6 (15G31) El capitan
Chrome Version 52.0.2743.116 (64-bit)

Hi guys.

Im testing with 0.7.17 and Offline.check() give always offline false.
But Offline.state look like working when the connection change.

Anybody can confirm it?

same problem here with Chrome on Android:

Offline.options = { checkOnLoad: true, checks: { xhr: { url: https://bla.com/favicon.ico } } }; Offline.on('down', function() { setOnlineStatus('offline'); }); Offline.on('up', function() { setOnlineStatus('online'); }); console.log(Offline.state); ==> up console.log(Offline.check().offline); ==> false

Wrong state and check, because, the device has no internet connection, expected

Offline.state = down
Offline.check().offline = true