Skip to content

Commit 0673800

Browse files
committed
Consistency
1 parent f4dc71c commit 0673800

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pages/validators/yaml.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ const Home: NextPage = () => {
3333
let configObject;
3434
try {
3535
configObject = parse(config);
36-
if (!configObject) {
37-
setError("Missing Values");
38-
setParsedConfig({})
39-
} else if (!(configObject instanceof Object)) {
40-
setError("Key without value present")
36+
if (!configObject || !(configObject instanceof Object)) {
37+
setError("must be object");
4138
setParsedConfig({})
4239
} else {
4340
setError(false);

0 commit comments

Comments
 (0)