Prevent non-object values from being dispatched as new JSON content

This commit is contained in:
Kyle Shockey
2017-12-22 23:19:10 -06:00
parent 7693dfe5bc
commit ca0b248df2
2 changed files with 3 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ export const parseToJson = (str) => ({specActions, specSelectors, errActions}) =
line: e.mark && e.mark.line ? e.mark.line + 1 : undefined
})
}
if(json) {
if(json && typeof json === "object") {
return specActions.updateJsonSpec(json)
}
return {}