1
0
Эх сурвалжийг харах

Sanity-check decaffeinate app.views.HiddenPage

Simon Legner 1 жил өмнө
parent
commit
64242c04fe

+ 3 - 12
assets/javascripts/views/pages/hidden.js

@@ -1,14 +1,5 @@
-// TODO: This file was created by bulk-decaffeinate.
-// Sanity-check the conversion and remove this comment.
-/*
- * decaffeinate suggestions:
- * DS206: Consider reworking classes to avoid initClass
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
- */
 app.views.HiddenPage = class HiddenPage extends app.View {
-  static initClass() {
-    this.events = { click: "onClick" };
-  }
+  static events = { click: "onClick" };
 
   constructor(el, entry) {
     super(el);
@@ -16,7 +7,8 @@ app.views.HiddenPage = class HiddenPage extends app.View {
   }
 
   init() {
-    this.addSubview((this.notice = new app.views.Notice("disabledDoc")));
+    this.notice = new app.views.Notice("disabledDoc");
+    this.addSubview(this.notice);
     this.activate();
   }
 
@@ -28,4 +20,3 @@ app.views.HiddenPage = class HiddenPage extends app.View {
     }
   }
 };
-app.views.HiddenPage.initClass();