fix: setting contacts to 0 if below 0

This commit is contained in:
Ronny Mikalsen 2022-03-14 14:26:11 +01:00
parent eeeccff1ba
commit 576a0f9c33

View File

@ -1400,8 +1400,10 @@
* @function * @function
*/ */
removeContact: function() { removeContact: function() {
if ( this.contacts > 0 ) { --this.contacts;
--this.contacts;
if (this.contacts < 0) {
this.contacts = 0;
} }
} }
}; };