Skip to content

Commit

Permalink
fix: props enum undefined to control
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed May 15, 2021
1 parent d045429 commit 9bcc416
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/core/src/controls-randomize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const randomizeData = (controls: ComponentControls): RandomizedData => {
}
return {
name,
value: value === 'undefined' ? undefined : value,
value,
};
}
default:
Expand Down
3 changes: 2 additions & 1 deletion core/core/src/controls-smart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ export const controlFromProps = (
return {
type: ControlTypes.OPTIONS,
options: options.map((v: any) => {
return cleanQuotes(v.value ?? v);
const option = cleanQuotes(v.value ?? v);
return option === 'undefined' ? undefined : option;
}),
value,
};
Expand Down

0 comments on commit 9bcc416

Please sign in to comment.