Add check for module before offloading TH sprite

This commit is contained in:
Cohee 2023-08-29 21:50:26 +03:00
parent 6a028cc828
commit 7b51d94e1b

View File

@ -394,6 +394,11 @@ function onExpressionsShowDefaultInput() {
}
async function unloadLiveChar() {
if (!modules.includes('talkinghead')) {
console.debug('talkinghead module is disabled');
return;
}
try {
const url = new URL(getApiUrl());
url.pathname = '/api/talkinghead/unload';