Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Make @houndci-bot happy with return null? #275 + PR #292
Browse files Browse the repository at this point in the history
  • Loading branch information
clemens-tolboom committed Jul 11, 2016
1 parent c3706c2 commit d4064f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bot.user.js
Expand Up @@ -1048,7 +1048,7 @@ var scheduler = window.scheduler = (function() {
* Get the task for give ID.
*
* @param id
* @returns {*}
* @returns {null|{}}
*/
getTask: function(id) {
var index = scheduler.tasks.findIndex(function(v) {
Expand All @@ -1060,6 +1060,7 @@ var scheduler = window.scheduler = (function() {
}

console.log('Task ' + id + ' not found');
return null;

},

Expand Down Expand Up @@ -1514,7 +1515,7 @@ var userInterface = window.userInterface = (function() {
getTaskMenu: function() {
var ids = userInterface.getOrderedTaskIDs();
var menu = '';
ids.forEach(function(v,i,l){
ids.forEach(function(v, i) {
var task = scheduler.getTask(v);
menu += '<br/>- ' + (i + 1) + ' ' + (task.active ? '*' : ' ') + v;
});
Expand All @@ -1528,7 +1529,7 @@ var userInterface = window.userInterface = (function() {
*/
getOrderedTaskIDs: function() {
var ids = [];
scheduler.tasks.forEach(function(v, i, l) {
scheduler.tasks.forEach(function(v) {
if (v.id !== '_default') {
ids.push(v.id);
}
Expand Down

0 comments on commit d4064f6

Please sign in to comment.