Skip to content

Commit

Permalink
fix(@cubejs-client/playground): live preview check
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilev-alex committed Apr 14, 2021
1 parent a3beee7 commit 5b4b5b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/cubejs-playground/src/pages/Explore/ExplorePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type TPlaygroundContext = {
apiUrl: string;
cubejsToken: string;
basePath: string;
livePreview: boolean;
livePreview?: boolean;
};

type TLivePreviewContext = {
Expand Down Expand Up @@ -100,7 +100,9 @@ export default function ExplorePage() {

return (
<LivePreviewContextProvider
disabled={playgroundContext?.livePreview === false}
disabled={
playgroundContext?.livePreview == null || !playgroundContext.livePreview
}
onChange={handleChangeLivePreview}
>
<CubeProvider cubejsApi={cubejsApi}>
Expand Down

0 comments on commit 5b4b5b8

Please sign in to comment.