Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Nov 20, 2020
1 parent 89f1b53 commit 3c8a1e0
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ export class BookEmbeddableFactoryDefinition

private async unwrapMethod(savedObjectId: string): Promise<BookSavedObjectAttributes> {
const { savedObjectsClient } = await this.getStartServices();
const savedObject: SimpleSavedObject<BookSavedObjectAttributes> = await savedObjectsClient.get<
BookSavedObjectAttributes
>(this.type, savedObjectId);
const savedObject: SimpleSavedObject<BookSavedObjectAttributes> = await savedObjectsClient.get<BookSavedObjectAttributes>(
this.type,
savedObjectId
);
return { ...savedObject.attributes };
}

Expand Down Expand Up @@ -163,9 +164,9 @@ export class BookEmbeddableFactoryDefinition

private async getAttributeService() {
if (!this.attributeService) {
this.attributeService = (await this.getStartServices()).getAttributeService<
BookSavedObjectAttributes
>(this.type, {
this.attributeService = (
await this.getStartServices()
).getAttributeService<BookSavedObjectAttributes>(this.type, {
saveMethod: this.saveMethod.bind(this),
unwrapMethod: this.unwrapMethod.bind(this),
checkForDuplicateTitle: this.checkForDuplicateTitleMethod.bind(this),
Expand Down

0 comments on commit 3c8a1e0

Please sign in to comment.