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