瀏覽代碼

Sanity-check decaffeinate app.views.HiddenPage

Simon Legner 1 年之前
父節點
當前提交
64242c04fe
共有 1 個文件被更改,包括 3 次插入12 次删除
  1. 3 12
      assets/javascripts/views/pages/hidden.js

+ 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();