Skip to content

Commit 4519cd9

Browse files
committed
LayerGroup.getErrors
1 parent 99c3450 commit 4519cd9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

x-pack/plugins/maps/public/classes/layers/layer_group/layer_group.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,10 @@ export class LayerGroup implements ILayer {
283283
}
284284

285285
getErrors(): string {
286-
// TODO return childLayers.reduce.getErrors()
287-
return '';
286+
const firstChildWithError = this._children.find((child) => {
287+
return child.hasErrors();
288+
});
289+
return firstChildWithError ? firstChildWithError.getErrors() : '';
288290
}
289291

290292
async syncData(syncContext: DataRequestContext) {

0 commit comments

Comments
 (0)