summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/todos.js.es6
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-09-09 18:31:26 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-05 11:25:03 +0200
commitb3917d4868120c5a62e4e5525bd3321cb152e2fd (patch)
tree1a5ec2fd6298a1bcde2487463e1a1a51f6cb36b6 /app/assets/javascripts/todos.js.es6
parent7beb9f3483cf59a9717c2ccc6bd102cd9a97f906 (diff)
downloadgitlab-ce-b3917d4868120c5a62e4e5525bd3321cb152e2fd.tar.gz
Set defaults in constructor, in case opts are undefined.
Diffstat (limited to 'app/assets/javascripts/todos.js.es6')
-rw-r--r--app/assets/javascripts/todos.js.es64
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/todos.js.es6 b/app/assets/javascripts/todos.js.es6
index d8dca490e3e..7e606196435 100644
--- a/app/assets/javascripts/todos.js.es6
+++ b/app/assets/javascripts/todos.js.es6
@@ -1,10 +1,10 @@
((global) => {
class Todos {
- constructor({ el = $('.js-todos-options') }) {
+ constructor({ el }) {
this.allDoneClicked = this.allDoneClicked.bind(this);
this.doneClicked = this.doneClicked.bind(this);
- this.el = el;
+ this.el = el || $('.js-todos-options');
this.perPage = el.data('perPage');
this.clearListeners();
this.initBtnListeners();