This commit is contained in:
MomentQYC 2024-10-05 17:21:40 +08:00
parent 69b1acc1f0
commit 8d2d3617c3
3 changed files with 21 additions and 20 deletions

View file

@ -623,15 +623,15 @@ function emitUpdReaction(emoji: string, delta: number) {
}
watch(convert, (newBlob) => {
if (converturl.value && converturl.value.url) {
URL.revokeObjectURL(converturl.value.url);
}
if (converturl.value && converturl.value.url) {
URL.revokeObjectURL(converturl.value.url);
}
if (newBlob) {
converturl.value = { url: URL.createObjectURL(newBlob) };
} else {
converturl.value = null;
}
if (newBlob) {
converturl.value = { url: newBlob };
} else {
converturl.value = null;
}
});
console.log(converturl)

View file

@ -558,17 +558,19 @@ function loadConversation() {
}
watch(convert, (newBlob) => {
/*
try {
if (converturl.value && converturl.value.url) {
URL.revokeObjectURL(converturl.value.url);
}
} catch (error) {
console.error('Failed to revoke URL:', error);
}
console.error('Failed to revoke URL:', error);
}
*/
try {
if (newBlob) {
converturl.value = { url: URL.createObjectURL(newBlob) };
converturl.value = { url: newBlob };
} else {
converturl.value = null;
}