Skip to content

Commit fdd75b7

Browse files
committed
Review changes
1 parent c4fa61a commit fdd75b7

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/plugins/dashboard/public/application/actions/library_notification_action.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export class LibraryNotificationAction implements ActionByType<typeof ACTION_LIB
7979

8080
public isCompatible = async ({ embeddable }: LibraryNotificationActionContext) => {
8181
return (
82-
embeddable.getRoot() &&
8382
embeddable.getRoot().isContainer &&
8483
embeddable.getInput()?.viewMode !== ViewMode.VIEW &&
8584
isReferenceOrValueEmbeddable(embeddable) &&

src/plugins/dashboard/public/attribute_service/attribute_service.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class AttributeService<
156156
};
157157

158158
public getExplicitInputFromEmbeddable(embeddable: IEmbeddable): ValType | RefType {
159-
return ((embeddable.getRoot() as Container)?.getInput()?.panels?.[embeddable.id]
159+
return ((embeddable.getRoot() as Container).getInput()?.panels?.[embeddable.id]
160160
?.explicitInput ?? embeddable.getInput()) as ValType | RefType;
161161
}
162162

x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class Embeddable
136136
};
137137
const expression = await this.deps.documentToExpression(this.savedVis);
138138
this.expression = expression ? this.deps.toExpressionString(expression) : null;
139-
this.initializeOutput();
139+
await this.initializeOutput();
140140
this.isInitialized = true;
141141
if (this.domNode) {
142142
this.render(this.domNode);
@@ -257,12 +257,9 @@ export class Embeddable
257257
// to show.
258258
return null;
259259
}
260-
});
261-
const indexPatterns = (
262-
await Promise.all(promises)
263-
).filter((indexPattern: IndexPattern | null): indexPattern is IndexPattern =>
264-
Boolean(indexPattern)
265-
);
260+
})
261+
.filter((promise): promise is Promise<IndexPattern> => Boolean(promise));
262+
const indexPatterns = await Promise.all(promises);
266263
// passing edit url and index patterns to the output of this embeddable for
267264
// the container to pick them up and use them to configure filter bar and
268265
// config dropdown correctly.

0 commit comments

Comments
 (0)