Skip to content

Commit a35b58c

Browse files
authored
fix: blank initial state (#100)
1 parent 9e80adc commit a35b58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ function reducer(state, action) {
4545

4646
export function PlaygroundProvider(props) {
4747
let { initialValues: { markup, query } = {} } = props;
48-
const result = parser.parse({ markup, query, cacheId: props.instanceId });
4948

5049
if (!markup && !query) {
5150
markup = defaultValues.markup;
5251
query = defaultValues.query;
5352
}
5453

54+
const result = parser.parse({ markup, query, cacheId: props.instanceId });
5555
const [state, dispatch] = useReducer(reducer, { result, markup, query });
5656

5757
useEffect(() => {

0 commit comments

Comments
 (0)