History

Sanity-check decaffeinate app.views.Path

Simon Legner committed 2 years ago

Commit 329da391 parent a86eca41 file · +5 −16Browse files

Unified · Split

assets/javascripts/views/layout/path.js+5−16
@@ -1,23 +1,13 @@
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− * DS206: Consider reworking classes to avoid initClass
7− * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
8− */
91 app.views.Path = class Path extends app.View {
10− static initClass() {
11− this.className = "_path";
12− this.attributes = { role: "complementary" };
2+ static className = "_path";
3+ static attributes = { role: "complementary" };
134
14− this.events = { click: "onClick" };
5+ static events = { click: "onClick" };
156
16− this.routes = { after: "afterRoute" };
17− }
7+ static routes = { after: "afterRoute" };
188
199 render(...args) {
20− this.html(this.tmpl("path", ...Array.from(args)));
10+ this.html(this.tmpl("path", ...args));
2111 this.show();
2212 }
2313
@@ -59,4 +49,3 @@ app.views.Path = class Path extends app.View { · 35 unmodified lines
5949 }
6050 }
6151 };
62−app.views.Path.initClass();