Skip to content

Commit

Permalink
Merge pull request #231 from flatironinstitute/bugfix-226-empty-strin…
Browse files Browse the repository at this point in the history
…g-default

Replace default unparsed JSON with empty string instead of undefined.
  • Loading branch information
WardBrian authored Oct 29, 2024
2 parents b0f9fd2 + a9e3666 commit 79e1111
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 79e1111

Please sign in to comment.