Skip to content

Commit

Permalink
fix: accommodate enum values equal to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jun 12, 2024
1 parent 143d842 commit a96a408
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var str2enum = require( '@stdlib/strided/base/dtype-str2enum' );
function resolve( dtype ) {
var t = ( typeof dtype );
if ( t === 'string' ) {
return ( str2enum( dtype ) ) ? dtype : null;
return ( str2enum( dtype ) === null ) ? null : dtype;
}
if ( t === 'number' ) {
return enum2str( dtype );
Expand Down

1 comment on commit a96a408

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
blas/base/cscal $\color{green}459/459$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}459/459$
$\color{green}+100.00\%$
strided/base/dtype-resolve-str $\color{red}95/96$
$\color{green}+98.96\%$
$\color{red}7/8$
$\color{green}+87.50\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{red}95/96$
$\color{green}+98.96\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.