From e49d6cbd00be83e25f6d3309f694fb5271667c53 Mon Sep 17 00:00:00 2001 From: Andrew Tate Date: Thu, 11 Nov 2021 09:47:39 -0600 Subject: [PATCH] increase type safety --- x-pack/plugins/lens/public/embeddable/embeddable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index 2efc25601ea2d..563e10bb03abd 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -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,