Skip to content

Commit 1add791

Browse files
committed
fix: resolve normalized data type
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent b5edd51 commit 1add791

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/random/tools/binary/lib

lib/node_modules/@stdlib/random/tools/binary/lib/validate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ function validate( opts, dtypes, options ) {
6161
return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
6262
}
6363
if ( hasOwnProp( options, 'dtype' ) ) {
64-
opts.dtype = options.dtype;
65-
if ( !contains( dtypes, resolveStr( opts.dtype ) ) ) {
66-
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes, '", "' ), opts.dtype ) );
64+
opts.dtype = resolveStr( options.dtype );
65+
if ( !contains( dtypes, opts.dtype ) ) {
66+
return new TypeError( format( 'invalid option. `%s` option must be one of the following: "%s". Option: `%s`.', 'dtype', join( dtypes, '", "' ), options.dtype ) );
6767
}
6868
}
6969
// Pass-through options...

0 commit comments

Comments
 (0)