From 62dcea90cf899ca2d0f5d64020db77498e45c7c7 Mon Sep 17 00:00:00 2001 From: Arjan Date: Sat, 1 Aug 2026 07:15:17 +0530 Subject: [PATCH] fix: add check if xMin changed before emitting change event --- 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_pkg_readmes status: na - task: lint_markdown_docs status: na - 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 --- --- .../@stdlib/plot/ctor/lib/props/x-min/set.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/ctor/lib/props/x-min/set.js b/lib/node_modules/@stdlib/plot/ctor/lib/props/x-min/set.js index 6a097f0235fa..8ba2ec72b103 100644 --- a/lib/node_modules/@stdlib/plot/ctor/lib/props/x-min/set.js +++ b/lib/node_modules/@stdlib/plot/ctor/lib/props/x-min/set.js @@ -49,16 +49,18 @@ function set( min ) { !isNull( min ) && !isNumber( min ) // FIXME: finite number - // TODO: Date + // TODO: Date ) { throw new TypeError( format( 'invalid assignment. `%s` must be a finite number, Date, or null. Value: `%s`.', 'xMin', min ) ); } - debug( 'Current value: %s.', this._xMin ); + if ( min !== this._xMin ) { + debug( 'Current value: %s.', this._xMin ); - this._xMin = min; - debug( 'New value: %s.', this._xMin ); + this._xMin = min; + debug( 'New value: %s.', this._xMin ); - this.emit( 'change' ); + this.emit( 'change' ); + } }