Skip to content

Commit

Permalink
hotfixes selector default onUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
jhmullen committed Aug 16, 2022
1 parent da38ce5 commit e44f0d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cms/src/components/sections/components/Selector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class Selector extends Component {
componentDidUpdate(prevProps) {
if (prevProps.default !== this.props.default) {
this.setState({
comparisons: this.props.default,
comparisons: typeof this.props.default === "string"
? this.props.default.split(",").filter(d => d.length)
: this.props.default || [],
activeValue: this.props.default
});
}
Expand Down

0 comments on commit e44f0d4

Please sign in to comment.