Skip to content

Commit

Permalink
vscode extension: Fix wasm preview in debug
Browse files Browse the repository at this point in the history
It asserts that the "experimental" argument to create is not set
  • Loading branch information
ogoffart committed Mar 6, 2024
1 parent fde4114 commit d90b918
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editors/vscode/src/wasm_preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function getPreviewHtml(
slint_wasm_preview_url: Uri,
default_style: string,
): string {
const experimental = process.env.hasOwnProperty("SLINT_ENABLE_EXPERIMENTAL_FEATURES");
const result = `<!DOCTYPE html>
<html lang="en" style="height: 100%; width: 100%;">
<head>
Expand Down Expand Up @@ -143,6 +144,7 @@ function getPreviewHtml(
vscode.postMessage({ command: "map_url", url: url });
})},
"${default_style}",
${experimental ? "true" : "false"}
);
window.addEventListener('message', async message => {
Expand Down

0 comments on commit d90b918

Please sign in to comment.