From 8e89dcf0b92415c6c6ac405666cc776639aeea1a Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 26 May 2025 04:24:12 +0200 Subject: [PATCH] Ensure default image is set only if petting is not active in endSpeech method --- animeCat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/animeCat.js b/animeCat.js index 90fc7fe..ace8302 100644 --- a/animeCat.js +++ b/animeCat.js @@ -391,7 +391,9 @@ _bindMouseHold() { /** Call when the stream ends */ endSpeech() { clearInterval(this._talkIntervalId); - this.img.src = this.images.default; + if (!this._pettingActive) { + this.img.src = this.images.default; + } this._speechTimeout = setTimeout(() => { this.bubble.style.opacity = '0'; this._isSpeaking = false;