diff --git a/src/js/index.js b/src/js/index.js index 0054364..b99dca9 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -167,8 +167,8 @@ const handle_enter = function () { if (value.description) { value = value.description; } - } catch (e) { - value = e.message; + } catch (exception) { + value = exception ? exception.message : undefined; } command_history_element.innerText += value.toString() + "\n"; command_history.push(command);