Skip to content

Commit

Permalink
Fix arg passing lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jan 11, 2017
1 parent 3cd53f6 commit 4e636d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions editor/js/ui/keyboard.js
Expand Up @@ -281,11 +281,11 @@ RED.keyboard = (function() {
key.html(RED._('keyboard.unassigned'));
}

var text = object.id.replace(/(^.+:([a-z]))|(-([a-z]))/g,function(_,_,A,_,B,pos) {
if (pos === 0) {
return A.toUpperCase();
var text = object.id.replace(/(^.+:([a-z]))|(-([a-z]))/g,function() {
if (arguments[5] === 0) {
return arguments[2].toUpperCase();
} else {
return " "+B.toUpperCase();
return " "+arguments[4].toUpperCase();
}
});
var label = $('<div>').html(text).appendTo(item);
Expand Down

0 comments on commit 4e636d7

Please sign in to comment.