Browse Source

adjust fetch NODE_ENV

itizawa 6 years ago
parent
commit
c1b565279a

+ 1 - 2
src/client/js/components/Admin/Customize/CustomizeLayoutSetting.jsx

@@ -47,14 +47,13 @@ class CustomizeLayoutSetting extends React.Component {
 
 
   render() {
   render() {
     const { t } = this.props;
     const { t } = this.props;
-    const { NODE_ENV } = this.props.appContainer.config.env;
 
 
     return (
     return (
       <React.Fragment>
       <React.Fragment>
         <h2>{t('customize_page.Layout')}</h2>
         <h2>{t('customize_page.Layout')}</h2>
         <CustomizeLayoutOptions />
         <CustomizeLayoutOptions />
         <h2>{ t('customize_page.Theme') }</h2>
         <h2>{ t('customize_page.Theme') }</h2>
-        {NODE_ENV === 'development' && (this.renderDevAlert())}
+        {process.env.NODE_ENV === 'development' && (this.renderDevAlert())}
         <CustomizeThemeOptions />
         <CustomizeThemeOptions />
         <div className="form-group my-3">
         <div className="form-group my-3">
           <div className="col-xs-offset-4 col-xs-5">
           <div className="col-xs-offset-4 col-xs-5">

+ 0 - 1
src/server/models/config.js

@@ -185,7 +185,6 @@ module.exports = function(crowi) {
       isSavedStatesOfTabChanges: crowi.configManager.getConfig('crowi', 'customize:isSavedStatesOfTabChanges'),
       isSavedStatesOfTabChanges: crowi.configManager.getConfig('crowi', 'customize:isSavedStatesOfTabChanges'),
       hasSlackConfig: crowi.slackNotificationService.hasSlackConfig(),
       hasSlackConfig: crowi.slackNotificationService.hasSlackConfig(),
       env: {
       env: {
-        NODE_ENV: env.NODE_ENV || 'default',
         PLANTUML_URI: env.PLANTUML_URI || null,
         PLANTUML_URI: env.PLANTUML_URI || null,
         BLOCKDIAG_URI: env.BLOCKDIAG_URI || null,
         BLOCKDIAG_URI: env.BLOCKDIAG_URI || null,
         HACKMD_URI: env.HACKMD_URI || null,
         HACKMD_URI: env.HACKMD_URI || null,