Skip to content

Commit

Permalink
fix: set alerts to undefined (#440)
Browse files Browse the repository at this point in the history
* fix: set alerts to undefined by default

* fix: base url needed for header bar in production builds
  • Loading branch information
turban authored Feb 6, 2020
1 parent fa9cf81 commit d7ab7e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/loaders/boundaryLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const boundaryLoader = async config => {
name: layerName,
alerts: !features.length
? [createAlert(i18n.t('Alert'), i18n.t('No boundaries found'))]
: null,
: undefined,
isLoaded: true,
isExpanded: true,
isVisible: true,
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const layer = (state, action) => {
case types.ALERTS_CLEAR:
return {
...state,
alerts: null,
alerts: undefined,
};

case types.MAP_EARTH_ENGINE_VALUE_SHOW:
Expand Down Expand Up @@ -324,7 +324,7 @@ const map = (state = defaultState, action) => {
case types.ALERTS_CLEAR:
return {
...state,
alerts: null,
alerts: undefined,
mapViews: state.mapViews.map(l => layer(l, action)),
};

Expand Down
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ if (!isDevBuild) {
// Replace any occurance of process.env.NODE_ENV with the string 'production'
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify('production') },
DHIS_CONFIG: JSON.stringify({}),
DHIS_CONFIG: JSON.stringify({
baseUrl: '../',
}),
})
);
webpackConfig.plugins.push(new webpack.optimize.OccurrenceOrderPlugin());
Expand Down

0 comments on commit d7ab7e6

Please sign in to comment.