(cb?: Function)
| 45 | }; |
| 46 | |
| 47 | const needsUpdate = async (cb?: Function) => { |
| 48 | try { |
| 49 | const info = await loadEtherpadInformations() |
| 50 | if (semver.gt(info!.latestVersion, getEpVersion())) { |
| 51 | if (cb) return cb(true); |
| 52 | } |
| 53 | } catch (err) { |
| 54 | console.error(`Can not perform Etherpad update check: ${err}`); |
| 55 | if (cb) return cb(false); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | export const check = () => { |
| 60 | if (!settings.privacy.updateCheck) { |
no test coverage detected