Skip to content

Commit

Permalink
fix regression, from b0aa066, #38
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 12, 2023
1 parent ec28115 commit d25bb59
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions js/AtomIdentifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14277,84 +14277,73 @@ const AtomIdentifier = {
switch( allDecays[ i ] ) {
case 'B-':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_MINUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_MINUS_DECAY ) ) {
basicDecays.push( { BETA_MINUS_DECAY: allDecaysAndPercents[ 'B-' ] } );
}
break;
case '2B-':
break;
case 'EC+B+':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_PLUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_PLUS_DECAY ) ) {
basicDecays.push( { BETA_PLUS_DECAY: allDecaysAndPercents[ 'EC+B+' ] } );
}
break;
case 'EC':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_PLUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_PLUS_DECAY ) ) {
basicDecays.push( { BETA_PLUS_DECAY: allDecaysAndPercents.EC } );
}
break;
case 'B+':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_PLUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_PLUS_DECAY ) ) {
basicDecays.push( { BETA_PLUS_DECAY: allDecaysAndPercents[ 'B+' ] } );
}
break;
case 'B++EC':
break;
case '2EC':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_PLUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_PLUS_DECAY ) ) {
basicDecays.push( { BETA_PLUS_DECAY: allDecaysAndPercents[ '2EC' ] } );
}
break;
case '2B+':
break;
case 'A':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'ALPHA_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.ALPHA_DECAY ) ) {
basicDecays.push( { ALPHA_DECAY: allDecaysAndPercents.A } );
}
break;
case 'P':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'PROTON_EMISSION' ) ) {
if ( !_.some( basicDecays, decay => !!decay.PROTON_EMISSION ) ) {
basicDecays.push( { PROTON_EMISSION: allDecaysAndPercents.P } );
}
break;
case 'N':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'NEUTRON_EMISSION' ) ) {
if ( !_.some( basicDecays, decay => !!decay.NEUTRON_EMISSION ) ) {
basicDecays.push( { NEUTRON_EMISSION: allDecaysAndPercents.N } );
}
break;
case '2P':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'PROTON_EMISSION' ) ) {
if ( !_.some( basicDecays, decay => !!decay.PROTON_EMISSION ) ) {
basicDecays.push( { PROTON_EMISSION: allDecaysAndPercents[ '2P' ] } );
}
break;
case '2N':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'NEUTRON_EMISSION' ) ) {
if ( !_.some( basicDecays, decay => !!decay.NEUTRON_EMISSION ) ) {
basicDecays.push( { NEUTRON_EMISSION: allDecaysAndPercents[ '2N' ] } );
}
break;
case 'B+A':

// @ts-expect-error this is so buggy, not sure what to do here, https://github.com/phetsims/shred/issues/38
if ( basicDecays.includes( 'BETA_PLUS_DECAY' ) ) {
if ( !_.some( basicDecays, decay => !!decay.BETA_PLUS_DECAY ) ) {
basicDecays.push( { BETA_PLUS_DECAY: allDecaysAndPercents[ 'B+A' ] } );
}
break;
Expand Down

0 comments on commit d25bb59

Please sign in to comment.