Skip to content

Commit 98b39ba

Browse files
authored
Update entrypoint.js
1 parent 2044c46 commit 98b39ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

entrypoint.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ function parseDefaultObjectValue(rootObject, vObj) {
354354
let newValue = rootObject.DataObjects.find(obj => obj.Name == vObj.Value.Value)
355355
if (!newValue) newValue = rootObject.DataInputs.find(obj => obj.Name == vObj.Value.Value)
356356
if (!newValue) newValue = rootObject.EnumObjects.find(obj => obj.Name == vObj.Value.Value)
357-
if (newValue.Type === "EnumObject") {
357+
if (!newValue) {
358+
throw { message: 'Cannot find any definition of this object in schema.', object: vObj }
359+
} else if (newValue.Type === "EnumObject") {
358360
vObj.Value.Default = newValue.Value[0].Value
359361
vObj.Value.isEnumObject = true
360362
vObj.Value.isQuotedType = true

0 commit comments

Comments
 (0)