Skip to content

Commit e6bf0b3

Browse files
committed
Auto-generated commit
1 parent 013db86 commit e6bf0b3

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

CHANGELOG.md

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

3535
<details>
3636

37+
- [`d705c4c`](https://github.com/stdlib-js/stdlib/commit/d705c4ce5bd726a4be870909e5c62b87927858c5) - **refactor:** guard against `null` and `undefined` _(by Athan Reines)_
3738
- [`1908bae`](https://github.com/stdlib-js/stdlib/commit/1908bae6fe4852798ed12f620b59af50f762f2e5) - **feat:** add support for `struct` and `DataType` dtype values _(by Athan Reines)_
3839
- [`a464a60`](https://github.com/stdlib-js/stdlib/commit/a464a60568b819f813aff054ba0c32476192d269) - **chore:** fix EditorConfig lint errors [(#6246)](https://github.com/stdlib-js/stdlib/pull/6246) _(by MANI, Athan Reines)_
3940
- [`b6a6575`](https://github.com/stdlib-js/stdlib/commit/b6a657548d4e7beacc37f26e7f49c77ae3ea2f0b) - **chore:** fix EditorConfig lint errors [(#6057)](https://github.com/stdlib-js/stdlib/pull/6057) _(by Kaushikgtm)_

dist/index.js

Lines changed: 3 additions & 3 deletions
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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ function bytesPerElement( dtype ) {
6060
if ( isString( dtype ) ) {
6161
return BYTES_PER_ELEMENT[ dtype ] || null;
6262
}
63-
v = dtype.byteLength;
64-
if ( isPositiveInteger( v ) ) {
65-
return v;
63+
if ( dtype ) {
64+
v = dtype.byteLength;
65+
if ( isPositiveInteger( v ) ) {
66+
return v;
67+
}
6668
}
6769
return null;
6870
}

0 commit comments

Comments
 (0)