We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
change
1 parent a302d62 commit c2f868cCopy full SHA for c2f868c
lib/node_modules/@stdlib/plot/components/svg/rug/lib/props/scale/set.js
@@ -20,12 +20,14 @@ function set( fcn ) {
20
if ( !isFunction( fcn ) ) {
21
throw new TypeError( 'invalid value. `scale` must be a function. Value: `' + fcn + '.`' );
22
}
23
- debug( 'Current value: %s.', this._scale );
+ if ( fcn !== this._scale ) {
24
+ debug( 'Current value: %s.', this._scale );
25
- this._scale = fcn;
26
- debug( 'New Value: %s.', this._scale );
+ this._scale = fcn;
27
+ debug( 'New Value: %s.', this._scale );
28
- this.emit( 'change' );
29
+ this.emit( 'change' );
30
+ }
31
} // end FUNCTION set()
32
33
0 commit comments