Skip to content

Commit

Permalink
refactor: revert any type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredrethman committed Apr 10, 2024
1 parent e1fce56 commit 6b5bd22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/wizards/engagement/components/prerequisite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ export default function Prerequisite( {
onClick={ () => {
const dataToSave: Partial< Config > = {};
fieldKeys.forEach( fieldName => {
if ( typeof config[ fieldName ] !== 'undefined' ) {
dataToSave[ fieldName ] = config[ fieldName ] as any;
if ( config[ fieldName ] ) {
// @ts-ignore - not sure what's the issue here.
dataToSave[ fieldName ] = config[ fieldName ];
}
} );
saveConfig( dataToSave );
Expand Down

0 comments on commit 6b5bd22

Please sign in to comment.