History

Sanity-check decaffeinate app.views.OfflinePage

Simon Legner committed 2 years ago

Commit f9f5c2b1 parent 35b38b71 file · +6 −18Browse files

Unified · Split

assets/javascripts/views/content/offline_page.js+6−18
@@ -1,21 +1,10 @@
1−// TODO: This file was created by bulk-decaffeinate.
2−// Sanity-check the conversion and remove this comment.
3−/*
4− * decaffeinate suggestions:
5− * DS101: Remove unnecessary use of Array.from
6− * DS102: Remove unnecessary code created because of implicit returns
7− * DS206: Consider reworking classes to avoid initClass
8− * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
9− */
101 app.views.OfflinePage = class OfflinePage extends app.View {
11− static initClass() {
12− this.className = "_static";
2+ static className = "_static";
133
14− this.events = {
15− click: "onClick",
16− change: "onChange",
17− };
18− }
4+ static events = {
5+ click: "onClick",
6+ change: "onChange",
7+ };
198
209 deactivate() {
2110 if (super.deactivate(...arguments)) {
@@ -37,7 +26,7 @@ app.views.OfflinePage = class OfflinePage extends app.View { · 15 unmodified lines
3726 this.html(this.tmpl("offlineError", app.db.reason, app.db.error));
3827 } else {
3928 let html = "";
40− for (var doc of Array.from(app.docs.all())) {
29+ for (var doc of app.docs.all()) {
4130 html += this.renderDoc(doc, statuses[doc.slug]);
4231 }
4332 this.html(this.tmpl("offlinePage", html));
@@ -154,4 +143,3 @@ app.views.OfflinePage = class OfflinePage extends app.View { · 110 unmodified lines
154143 }
155144 }
156145 };
157−app.views.OfflinePage.initClass();