Skip to content

Commit

Permalink
typescript conversion bug fix, #38
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Aug 2, 2023
1 parent e5d99a2 commit ec8ab1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/view/IsotopeElectronCloudView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ class IsotopeElectronCloudView extends Circle {
let minShellRadius = Number.MAX_VALUE;
let maxShellRadius = 0;

for ( const [ radius ] of mapElectronCountToRadius ) {
for ( const entry of mapElectronCountToRadius ) {
const radius = entry[ 1 ];
if ( radius > maxShellRadius ) {
maxShellRadius = radius;
}
Expand All @@ -119,7 +120,7 @@ class IsotopeElectronCloudView extends Circle {
return compressionFunction.evaluate( value );
};

if ( numElectrons in mapElectronCountToRadius ) {
if ( mapElectronCountToRadius.has( numElectrons ) ) {
return reduceRadiusRange( mapElectronCountToRadius.get( numElectrons )! );
}
else {
Expand Down

0 comments on commit ec8ab1f

Please sign in to comment.