Skip to content

Commit

Permalink
Fix debug overlay (#98)
Browse files Browse the repository at this point in the history
This PR fixes issue introduced in #93 where we'd not display device
preview in debug pause state.
  • Loading branch information
kmagiera committed Apr 10, 2024
1 parent 47a0193 commit 5b4fe15
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/vscode-extension/src/webview/components/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ function Preview({ isInspecting, setIsInspecting }: Props) {

const previewURL = projectState?.previewURL;

const hasErrors = hasBundleError || hasIncrementalBundleError || debugException;
const isStarting =
hasBundleError || hasIncrementalBundleError || debugException
? false
: !projectState || projectState.status === "starting";
const showDevicePreview =
previewURL &&
(showPreviewRequested ||
(!hasErrors &&
(projectState?.status === "running" || projectState?.status === "refreshing")));
projectState?.previewURL && (showPreviewRequested || (!isStarting && !hasBuildError));

useBuildErrorAlert(hasBuildError);
useBundleErrorAlert(hasBundleError || hasIncrementalBundleError);
Expand Down

0 comments on commit 5b4fe15

Please sign in to comment.