Skip to content

Commit 54cc256

Browse files
committed
fixed theme 8008 being previewed no matter which theme was selected. fixes #33
1 parent c5e3ee7 commit 54cc256

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

public/js/commandline.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ if (Object.keys(words).length > 0) {
298298
}
299299

300300
$("#commandLine input").keyup((e) => {
301-
if (e.keyCode == 38 || e.keyCode == 40) return;
301+
if (e.keyCode == 38 || e.keyCode == 40 || e.keyCode == 13) return;
302302
updateSuggestedCommands();
303303
});
304304

@@ -326,7 +326,9 @@ $("#commandInput textarea").keydown((e) => {
326326
$.each(currentCommands.list, (i, obj) => {
327327
if (obj.id == command) {
328328
obj.exec(value);
329-
subgroup = obj.subgroup;
329+
if (obj.subgroup !== null && obj.subgroup !== undefined) {
330+
subgroup = obj.subgroup;
331+
}
330332
}
331333
});
332334
firebase.analytics().logEvent('usedCommandLine', {
@@ -351,7 +353,9 @@ $("#commandLine input").keydown((e) => {
351353
showCommandInput(obj.id, obj.display);
352354
} else {
353355
obj.exec();
354-
subgroup = obj.subgroup;
356+
if (obj.subgroup !== null && obj.subgroup !== undefined) {
357+
subgroup = obj.subgroup;
358+
}
355359
}
356360
}
357361
});

0 commit comments

Comments
 (0)