This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push: new 45754f39 Fix #728 45754f39 is described below commit 45754f398044c91613b145ce2d705dfeca3be056 Author: Marat Gubaidullin <marat.gubaidul...@gmail.com> AuthorDate: Tue Apr 18 18:51:45 2023 -0400 Fix #728 --- karavan-vscode/webview/App.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/karavan-vscode/webview/App.tsx b/karavan-vscode/webview/App.tsx index 80c03416..0ac406a2 100644 --- a/karavan-vscode/webview/App.tsx +++ b/karavan-vscode/webview/App.tsx @@ -26,6 +26,7 @@ import { KameletsPage } from "./kamelets/KameletsPage"; import { ComponentsPage } from "./components/ComponentsPage"; import { EipPage } from "./eip/EipPage"; import { TemplateApi } from "./core/api/TemplateApi"; +import {EventBus} from "./designer/utils/EventBus"; interface Props { dark: boolean @@ -152,9 +153,7 @@ class App extends React.Component<Props, State> { this.setState({ active: false, hasChanges: false }); break; case 'downloadImage': - if (this.state.karavanDesignerRef) { - this.state.karavanDesignerRef.current.downloadImage(); - } + EventBus.sendCommand("downloadImage"); break; } };