Skip to content

Commit

Permalink
Disable the xstate inspector outside localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardo-forina committed Nov 15, 2024
1 parent afcf0db commit f0679b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ui/src/OpenApiEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ import { ResponseDesignerSkeleton } from "./responseDesigner/ResponseDesignerSke
import { NodeHeader } from "./components/NodeHeader.tsx";
import { Path } from "./components/Path.tsx";

const { inspect } = createBrowserInspector();
const { inspect } = createBrowserInspector({
autoStart: document.location.hostname === "localhost",
});

export type OpenApiEditorProps = {
getEditorState: (filter: string) => Promise<EditorModel>;
Expand Down Expand Up @@ -211,7 +213,7 @@ export function OpenApiEditor({
<OpenApiEditorMachineContext.Provider
logic={editorLogic}
options={{
inspect,
inspect: document.location.host === "localhost" ? inspect : undefined,
}}
>
<div
Expand Down

0 comments on commit f0679b6

Please sign in to comment.