diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index 02c84d964..28615b5ed 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -333,7 +333,8 @@ RunDialog.prototype = { _run : function(input, inTerminal) { let command = input; - if (this._history.length > 0 && this._history[this._history.length - 1] != input) { + if (this._history.length == 0 || + this._history[this._history.length - 1] != input) { this._history.push(input); this._saveHistory(); }