From 507465de0e6258cf8a1865898c9645479c5d1621 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Fri, 23 May 2025 11:01:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/control.js | 2 +- project/plugins.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/control.js b/libs/control.js index 40c5e047..b2d9c8d6 100644 --- a/libs/control.js +++ b/libs/control.js @@ -3105,7 +3105,7 @@ control.prototype.playSound = function (sound, pitch, inputCallback) { playingSoundList.push(sound); const callback = () => { playingSoundList = playingSoundList.filter((soundName) => soundName !== sound); - inputCallback(); + if (inputCallback) inputCallback(); } try { if (core.musicStatus.audioContext != null) { diff --git a/project/plugins.js b/project/plugins.js index 590bb084..fc40e18c 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -2550,7 +2550,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (!sortFunc) sortFunc = (itemId1, itemId2) => { const item1Count = itemsUsedCount[itemId1] || 0, item2Count = itemsUsedCount[itemId2] || 0; - return item1Count - item2Count; + return item2Count - item1Count; } let list = [];