Skip to content

Commit

Permalink
Replace default unparsed JSON with empty string instead of undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoules committed Oct 29, 2024
1 parent b0f9fd2 commit a9e3666
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/src/app/pages/HomePage/SamplingWindow/SamplingWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FunctionComponent, useCallback, useContext, useMemo } from "react";
import Box from "@mui/material/Box";
import Divider from "@mui/material/Divider";
import Grid from "@mui/material/Grid";
import { CompileContext } from "@SpCompilation/CompileContext";
import RunPanel from "@SpComponents/RunPanel";
import SamplerOutputView from "@SpComponents/SamplerOutputView";
import SamplingOptsPanel from "@SpComponents/SamplingOptsPanel";
Expand All @@ -13,9 +14,8 @@ import {
SamplingOpts,
} from "@SpCore/ProjectDataModel";
import AnalysisPyWindow from "@SpScripting/Analysis/AnalysisPyWindow";
import useStanSampler, { StanRun } from "@SpStanSampler/useStanSampler";
import AnalysisRWindow from "@SpScripting/Analysis/AnalysisRWindow";
import { CompileContext } from "@SpCompilation/CompileContext";
import useStanSampler, { StanRun } from "@SpStanSampler/useStanSampler";

type SamplingWindowProps = {
// none
Expand All @@ -27,7 +27,7 @@ const SamplingWindow: FunctionComponent<SamplingWindowProps> = () => {
try {
return JSON.parse(data.dataFileContent);
} catch (e) {
return undefined;
return "";
}
}, [data.dataFileContent]);

Expand Down

0 comments on commit a9e3666

Please sign in to comment.