[Maps] Remove data on error (#41358) (#41392)

This commit is contained in:
Thomas Neirynck 2019-07-17 14:59:12 -04:00 committed by GitHub
parent c06f74d007
commit 0522d5befd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -460,6 +460,7 @@ export function onDataLoadError(layerId, dataId, requestToken, errorMessage) {
dispatch(clearTooltipStateForLayer(layerId));
dispatch({
type: LAYER_DATA_LOAD_ERROR,
data: null,
layerId,
dataId,
requestToken,

View file

@ -378,7 +378,7 @@ export class VectorLayer extends AbstractLayer {
} catch (e) {
onLoadError(sourceDataId, requestToken, `Join error: ${e.message}`);
return {
dataHasChanged: false,
dataHasChanged: true,
join: join,
propertiesMap: null
};

View file

@ -192,7 +192,7 @@ export function map(state = INITIAL_STATE, action) {
case LAYER_DATA_LOAD_STARTED:
return updateWithDataRequest(state, action);
case LAYER_DATA_LOAD_ERROR:
return resetDataRequest(state, action);
return updateWithDataResponse(state, action);
case LAYER_DATA_LOAD_ENDED:
return updateWithDataResponse(state, action);
case TOUCH_LAYER: