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

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

View file

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

View file

@ -373,7 +373,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: