History

Sanity-check decaffeinate app.View

Simon Legner committed 2 years ago

Commit 29b09161 parent 3ea10501 file · +2 −11Browse files

Unified · Split

assets/javascripts/views/view.js+2−11
@@ -1,12 +1,3 @@
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− * DS207: Consider shorter variations of null checks
8− * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
9− */
101 app.View = class View extends Events {
112 constructor(el) {
123 super();
@@ -152,12 +143,12 @@ app.View = class View extends Events { · 139 unmodified lines
152143 }
153144
154145 tmpl(...args) {
155− return app.templates.render(...Array.from(args || []));
146+ return app.templates.render(...args);
156147 }
157148
158149 delay(fn, ...args) {
159150 const delay = typeof args[args.length - 1] === "number" ? args.pop() : 0;
160− return setTimeout(fn.bind(this, ...Array.from(args)), delay);
151+ return setTimeout(fn.bind(this, ...args), delay);
161152 }
162153
163154 onDOM(event, callback) {