fix for undefined, back to production mode
This commit is contained in:
parent
30a74579f9
commit
83bbc5edab
2 changed files with 32 additions and 28 deletions
|
|
@ -134,6 +134,7 @@ const handle_enter = function () {
|
||||||
let tokens = scan(command);
|
let tokens = scan(command);
|
||||||
let statement = parse(tokens);
|
let statement = parse(tokens);
|
||||||
value = visit(statement);
|
value = visit(statement);
|
||||||
|
if (value !== undefined) {
|
||||||
let binding;
|
let binding;
|
||||||
if (value.is_binding) { // if it's declaration work with the initializer
|
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
|
binding = value.name; // but we also need the name of the bound variable
|
||||||
|
|
@ -167,6 +168,9 @@ const handle_enter = function () {
|
||||||
if (value.description) {
|
if (value.description) {
|
||||||
value = value.description;
|
value = value.description;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
value = 'value is undefined';
|
||||||
|
}
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
value = exception.message;
|
value = exception.message;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ const path = require('path');
|
||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'development',
|
mode: 'production',
|
||||||
entry: './src/js/index.js',
|
entry: './src/js/index.js',
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue