Skip to content

Commit 3b216b7

Browse files
committed
Auto-generated commit
1 parent 1b87b9d commit 3b216b7

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
<details>
2424

25+
- [`27f1ef7`](https://github.com/stdlib-js/stdlib/commit/27f1ef7f2cc984271a6de66ad2dff042651e750a) - **test:** ensure full branch coverage _(by Athan Reines)_
2526
- [`f660e38`](https://github.com/stdlib-js/stdlib/commit/f660e38225095ed8c07324924ff37098d6f96851) - **feat:** add support for `struct` and `DataType` dtype values _(by Athan Reines)_
2627

2728
</details>

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function resolve( dtype ) {
5050
if ( t === 'string' ) {
5151
return str2enum( dtype );
5252
}
53-
if ( t === 'object' && isInteger( dtype.enum ) ) {
53+
if ( t === 'object' && dtype && isInteger( dtype.enum ) ) {
5454
return dtype.enum;
5555
}
5656
if ( isStructConstructorLike( dtype ) ) {

test/test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ tape( 'the function returns `null` if unable to resolve an enumeration constant'
155155
'bar',
156156
-99999999,
157157
-9999999999,
158-
-9999999999999
158+
-9999999999999,
159+
null,
160+
true,
161+
false
159162
];
160163
for ( i = 0; i < values.length; i++ ) {
161164
t.strictEqual( resolve( values[ i ] ), null, 'returns expected value' );

0 commit comments

Comments
 (0)