From 4e636d7eec5fb89602dabf84b731db729fbe8f58 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 11 Jan 2017 12:18:52 +0000 Subject: [PATCH] Fix arg passing lint error --- editor/js/ui/keyboard.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/js/ui/keyboard.js b/editor/js/ui/keyboard.js index c1f440ace..87bb648b5 100644 --- a/editor/js/ui/keyboard.js +++ b/editor/js/ui/keyboard.js @@ -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 = $('
').html(text).appendTo(item);