staltz / has-network2

MIT License
0 stars 1 forks source link

ReferenceError: localStorage is not defined #3

Closed cryptix closed 4 years ago

cryptix commented 4 years ago

I just ran into this after updating flotilla (oasis' ssb-server+plugin bundle).

ReferenceError: localStorage is not defined
    at module.exports (/home/cryptix/ssb/flotilla/node_modules/has-network2/index.js:13:46)
    at hasNetworkDebounced (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:25:21)
    at isOffline (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:33:17)
    at canBeConnected (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:35:32)
    at Array.filter (<anonymous>)
    at ConnScheduler.updateTheseConnections (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:225:14)
    at ConnScheduler.updateHubNow (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:272:18)
    at ConnScheduler.updateNow (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:343:14)
    at Timeout._onTimeout (/home/cryptix/ssb/flotilla/node_modules/ssb-conn/lib/conn-scheduler.js:353:18)
    at listOnTimeout (internal/timers.js:549:17)

versions:

staltz commented 4 years ago

Fixed in #2, just need to merge https://github.com/staltz/ssb-conn/pull/25 and make a new version of ssb-conn. (ETA some minutes)

staltz commented 4 years ago

Released ssb-conn@0.19.1