Skip to content

Commit 08b4e7a

Browse files
committed
Auto-generated commit
1 parent 973727f commit 08b4e7a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ A total of 24 issues were closed in this release:
558558

559559
<details>
560560

561+
- [`27f1ef7`](https://github.com/stdlib-js/stdlib/commit/27f1ef7f2cc984271a6de66ad2dff042651e750a) - **test:** ensure full branch coverage _(by Athan Reines)_
561562
- [`1908bae`](https://github.com/stdlib-js/stdlib/commit/1908bae6fe4852798ed12f620b59af50f762f2e5) - **feat:** add support for `struct` and `DataType` dtype values _(by Athan Reines)_
562563
- [`a83bb3d`](https://github.com/stdlib-js/stdlib/commit/a83bb3d053dd235dff135913f0c582e5c4391b80) - **refactor:** use assertion utility _(by Athan Reines)_
563564
- [`ae21126`](https://github.com/stdlib-js/stdlib/commit/ae2112615cd460c39161a41c32d18b7ab600c885) - **feat:** add support for struct arrays _(by Athan Reines)_

base/dtype-resolve-enum/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 ) ) {

base/dtype-resolve-enum/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)