fix for undefined, back to production mode

This commit is contained in:
Sander Hautvast 2021-03-05 19:43:38 +01:00
parent 30a74579f9
commit 83bbc5edab
2 changed files with 32 additions and 28 deletions

View file

@ -134,6 +134,7 @@ const handle_enter = function () {
let tokens = scan(command);
let statement = parse(tokens);
value = visit(statement);
if (value !== undefined) {
let binding;
if (value.is_binding) { // if it's declaration work with the initializer
binding = value.name; // but we also need the name of the bound variable
@ -167,6 +168,9 @@ const handle_enter = function () {
if (value.description) {
value = value.description;
}
} else {
value = 'value is undefined';
}
} catch (exception) {
value = exception.message;
}

View file

@ -2,7 +2,7 @@ const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
mode: 'development',
mode: 'production',
entry: './src/js/index.js',
output: {