History

Sanity-check decaffeinate app.UpdateChecker

Simon Legner committed 2 years ago

Commit c022a291 parent 8103c281 file · +1 −8Browse files

Unified · Split

assets/javascripts/app/update_checker.js+1−8
@@ -1,16 +1,9 @@
1// TODO: This file was created by bulk-decaffeinate.
2// Sanity-check the conversion and remove this comment.
3/*
4 * decaffeinate suggestions:
5 * DS207: Consider shorter variations of null checks
6 * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
7 */
8app.UpdateChecker = class UpdateChecker {1app.UpdateChecker = class UpdateChecker {
9 constructor() {2 constructor() {
10 this.lastCheck = Date.now();3 this.lastCheck = Date.now();
11 4
12 $.on(window, "focus", () => this.onFocus());5 $.on(window, "focus", () => this.onFocus());
13 if (app.serviceWorker != null) {6 if (app.serviceWorker) {
14 app.serviceWorker.on("updateready", () => this.onUpdateReady());7 app.serviceWorker.on("updateready", () => this.onUpdateReady());
15 }8 }
16 9