Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed Nov 27, 2023
1 parent b679ebf commit 017ca91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ describe('TileStatusTracker', () => {
await sleep(300);

expect(tileErrorsMap.get('layer1')?.length).toBe(1);

const geojsonLayer1 = createMockLayer('layer1', 'layer1Source');
geojsonLayer1.getSource = () => {
return {
Expand All @@ -285,9 +285,9 @@ describe('TileStatusTracker', () => {
},
isMvt() {
return false;
}
},
};
}
};
wrapper.setProps({ layerList: [geojsonLayer1] });

// simulate delay. Cache-checking is debounced.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ export class TileStatusTracker extends Component<Props> {
}

componentDidUpdate() {
this.props.layerList.forEach(layer => {
this.props.layerList.forEach((layer) => {
const source = layer.getSource();
if (source.isESSource() &&
if (
source.isESSource() &&
typeof (source as IVectorSource).isMvt === 'function' &&
!(source as IVectorSource).isMvt()) {
!(source as IVectorSource).isMvt()
) {
// clear tile cache when layer is not tiled
this._tileErrorCache.clearLayer(layer.getId(), this._updateTileStatusForAllLayers);
}
Expand Down

0 comments on commit 017ca91

Please sign in to comment.