From 1207f5abada76c0d27afdc2317459016340018d4 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Thu, 11 Nov 2021 14:09:06 +0530 Subject: [PATCH] Fixed error on register, zoom on safari and removed webpack copying env vars to bundle Signed-off-by: Ajay Bura --- public/index.html | 2 +- src/app/templates/auth/Auth.jsx | 2 +- webpack.common.js | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/public/index.html b/public/index.html index 640d6008..371c9e3e 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - + Cinny diff --git a/src/app/templates/auth/Auth.jsx b/src/app/templates/auth/Auth.jsx index 658b39fc..eae602cf 100644 --- a/src/app/templates/auth/Auth.jsx +++ b/src/app/templates/auth/Auth.jsx @@ -332,7 +332,7 @@ function Register({ registerInfo, loginFlow, baseUrl }) { actions.setSubmitting(false); }).catch((err) => { const msg = err.message || err.error; - if (['M_USER_IN_USE', 'M_INVALID_USERNAME', 'M_EXCLUSIVE'].indexOf(err.errcode) > 0) { + if (['M_USER_IN_USE', 'M_INVALID_USERNAME', 'M_EXCLUSIVE'].indexOf(err.errcode) > -1) { actions.setErrors({ username: err.errCode === 'M_USER_IN_USE' ? 'Username is already taken' : msg }); } else if (msg) actions.setErrors({ other: msg }); diff --git a/webpack.common.js b/webpack.common.js index d4d3513c..0dd3e092 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,6 +1,5 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); -const webpack = require('webpack'); const CopyPlugin = require("copy-webpack-plugin"); module.exports = { @@ -66,9 +65,6 @@ module.exports = { } } }), - new webpack.DefinePlugin({ - 'process.env': JSON.stringify(process.env), - }), new CopyPlugin({ patterns: [ { from: 'olm.wasm' },