-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
If you pass in an undefined schema value to the generator then it fails to extract an alias and errors with the message:
TypeError: Cannot destructure property alias of 'undefined' or 'null'.
Also happens if you set a default value of null for an input.
To fix this in the generateInputSchema function in generateInputSchema.js:
change:
// deep map change keys to aliases
const aliasedSchema = deepMapKeys(mappedSchema, (key, value) => {
const { alias } = value;
return alias || key;
});
to
// deep map change keys to aliases
const aliasedSchema = deepMapKeys(mappedSchema, (key, value) => {
const { alias } = value || {};
return alias || key;
});
by adding || {} to const { alias } = value
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers