Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
handeyeco committed Nov 26, 2024
1 parent b2859e9 commit febaac0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/perseus/src/widgets/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,15 @@ const propUpgrades = {
"1": (v0props: any): any => {
const {noneOfTheAbove, ...rest} = v0props;

let choices;
let hasNoneOfTheAbove;

if (!noneOfTheAbove) {
choices = v0props.choices;
hasNoneOfTheAbove = false;
} else {
if (noneOfTheAbove) {
throw new Error(
"radio widget v0 no longer supports auto noneOfTheAbove",
);
}

return {
...rest,
choices,
hasNoneOfTheAbove,
hasNoneOfTheAbove: false,
};
},
} as const;
Expand Down

0 comments on commit febaac0

Please sign in to comment.