From 329da39c08cfcef083a58f1d2d404febb8f6f9b8 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 6 Jan 2024 14:53:39 +0100 Subject: [PATCH] Sanity-check decaffeinate app.views.Path --- assets/javascripts/views/layout/path.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/assets/javascripts/views/layout/path.js b/assets/javascripts/views/layout/path.js index 14a97c79..4a85c150 100644 --- a/assets/javascripts/views/layout/path.js +++ b/assets/javascripts/views/layout/path.js @@ -1,23 +1,13 @@ -// TODO: This file was created by bulk-decaffeinate. -// Sanity-check the conversion and remove this comment. -/* - * decaffeinate suggestions: - * DS101: Remove unnecessary use of Array.from - * DS206: Consider reworking classes to avoid initClass - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md - */ app.views.Path = class Path extends app.View { - static initClass() { - this.className = "_path"; - this.attributes = { role: "complementary" }; + static className = "_path"; + static attributes = { role: "complementary" }; - this.events = { click: "onClick" }; + static events = { click: "onClick" }; - this.routes = { after: "afterRoute" }; - } + static routes = { after: "afterRoute" }; render(...args) { - this.html(this.tmpl("path", ...Array.from(args))); + this.html(this.tmpl("path", ...args)); this.show(); } @@ -59,4 +49,3 @@ app.views.Path = class Path extends app.View { } } }; -app.views.Path.initClass();