From 904a2c5fbf4d316896c547ef73e4e913759b984b Mon Sep 17 00:00:00 2001 From: Rocky Gray Date: Fri, 1 Mar 2019 17:48:22 -0500 Subject: [PATCH] Refactor show commands to extract keys from the object fixes #541 --- src/js/sandbox/commands.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/sandbox/commands.js b/src/js/sandbox/commands.js index 8b913564..7f4e359d 100644 --- a/src/js/sandbox/commands.js +++ b/src/js/sandbox/commands.js @@ -97,9 +97,10 @@ var instantCommands = [ intl.str('show-all-commands'), '
' ]; - allCommands.forEach(function(regex, command) { - lines.push(command); - }); + Object.keys(allCommands) + .forEach(function(command) { + lines.push(command); + }); throw new CommandResult({ msg: lines.join('\n')