Skip to content

Commit d903fc9

Browse files
committed
fix: require broadcast compatibility
1 parent 2769ce9 commit d903fc9

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/array/base/place/lib

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/array/base/place/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ function place( x, mask, values, mode ) {
267267
throw new Error( 'invalid arguments. Number of values does not equal the number of truthy values in the mask array.' );
268268
}
269269
} else if ( mode === 'broadcast' ) {
270-
if ( M > 1 && countTruthy( mask ) > M ) {
270+
if ( M !== 1 && countTruthy( mask ) > M ) {
271271
throw new Error( 'invalid arguments. Insufficient values to satisfy mask array.' );
272272
}
273273
} else if ( mode === 'strict_broadcast' ) {
274-
if ( M > 1 && countTruthy( mask ) !== M ) {
274+
if ( M !== 1 && countTruthy( mask ) !== M ) {
275275
throw new Error( 'invalid arguments. Number of values does not equal the number of truthy values in the mask array.' );
276276
}
277277
} else if ( mode === 'non_strict' ) {

0 commit comments

Comments
 (0)