diff --git a/package.json b/package.json index 9adfdd7..0ffdf37 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cyb", "description": "Web3 browser", "main": "public/electron.js", - "version": "0.0.27", + "version": "0.0.28", "author": { "name": "cybercongress", "email": "cybercongress42@gmail.com" diff --git a/src/redux/wallet.js b/src/redux/wallet.js index 117a060..d34cc64 100644 --- a/src/redux/wallet.js +++ b/src/redux/wallet.js @@ -99,10 +99,10 @@ export const loadAccounts = () => (dispatch, getState) => new Promise((resolve) export const setDefaultAccount = account => (dispatch) => { - let address; + let address = ''; let balance; if (!account) { - const defaultAccount = localStorage.getItem('defaultEthAccount'); + const defaultAccount = localStorage.getItem('defaultEthAccount') || ''; if (Object.keys(__accounts).length > 0) { if (defaultAccount) { address = defaultAccount; diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 8143afe..b63318a 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -13,10 +13,6 @@ function getPlugins(isProduction) { template: path.resolve(__dirname, '../', 'public', 'index.html'), favicon: path.resolve(__dirname, '../', 'public', 'favicon.ico'), }), - new BundleAnalyzerPlugin({ - analyzerMode: isProduction ? 'disabled' : 'server', - openAnalyzer: false, - }), new CopyWebpackPlugin( // Copy directory contents to {output}/ isProduction @@ -30,6 +26,9 @@ function getPlugins(isProduction) { if (!isProduction) { plugins.push(new webpack.HotModuleReplacementPlugin()); + plugins.push(new BundleAnalyzerPlugin({ + openAnalyzer: false, + })); } return plugins; @@ -101,7 +100,7 @@ module.exports = (env = {}, argv = {}) => { }, devtool: SOURCE_MAP, plugins: getPlugins(isProduction), - optimization: { +/* optimization: { runtimeChunk: 'single', splitChunks: { minSize: 220000, @@ -114,7 +113,7 @@ module.exports = (env = {}, argv = {}) => { }, }, }, - }, + },*/ devServer: { port: 3000, hot: true,