Skip to content

Commit

Permalink
fix: set jsx support to true before showing dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
khanti42 committed Nov 17, 2024
1 parent 7be6fec commit e007a30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class InitSnapStateManager extends StateManager<SnapState> {
async ensureJsxSupport(component: Component): Promise<void> {
await this.get();
try {
await this.setJsxSupport(true);
// Try rendering the JSX component to test compatibility
await snap.request({
method: 'snap_dialog',
Expand All @@ -80,7 +81,6 @@ export class InitSnapStateManager extends StateManager<SnapState> {
content: component,
},
});
await this.setJsxSupport(true);
} catch {
await this.setJsxSupport(false);
await snap.request({
Expand Down

0 comments on commit e007a30

Please sign in to comment.