Description/Screenshot
I've discovered that the offline channel never sends the stored messages if the page is initially offline on launch (this is being used inside of a cordova SPA).
The culprit seems to be this line here, where the isOnline state is captured only once ever, and the timer then incorrectly always decides it is offline: https://github.com/microsoft/ApplicationInsights-JS/blob/main/channels/offline-channel-js/src/OfflineChannel.ts#L444
Steps to Reproduce
Launching the page using the exact instructions as per https://github.com/microsoft/ApplicationInsights-JS/tree/main/channels/offline-channel-js, but with navigator.isOnline reporting false
"@microsoft/applicationinsights-offlinechannel-js": "^0.3.10",
"@microsoft/applicationinsights-web": "^3.3.10",
Expected behavior
Ideally the messages are sent when the network is restored 😁