Skip to content

Commit

Permalink
increase type safety
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed Nov 11, 2021
1 parent 88aa21c commit e49d6cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/lens/public/embeddable/embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ export class Embeddable
if (!this.savedVis) return;

// have to dance since this.savedVis.state is readonly
const newVis = JSON.parse(JSON.stringify(this.savedVis));
const newVis = JSON.parse(JSON.stringify(this.savedVis)) as Document;
newVis.state.visualization = this.onEditAction(newVis.state.visualization, event);
this.savedVis = newVis as Document;
this.savedVis = newVis;

const { expression, errors } = await getExpressionFromDocument(
this.savedVis,
Expand Down

0 comments on commit e49d6cb

Please sign in to comment.