Skip to content

Commit

Permalink
base1: Drop unnecessary apply()
Browse files Browse the repository at this point in the history
Spotted by eslint "no-useless-call" rule.
  • Loading branch information
martinpitt authored and KKoukiou committed Nov 28, 2018
1 parent deddb20 commit 7848f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base1/cockpit.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,14 @@ function Transport() {
} else if (channel !== undefined) {
func = control_cbs[channel];
if (func)
func.apply(null, [data]);
func(data);
}
}

function process_message(channel, payload) {
var func = message_cbs[channel];
if (func)
func.apply(null, [payload]);
func(payload);
}

/* The channel/control arguments is used by filters, and auto-populated if necessary */
Expand Down

0 comments on commit 7848f7b

Please sign in to comment.