mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix major slowdown in groups without sprites. Remove error handler after it's been fired
This commit is contained in:
@ -274,6 +274,8 @@ function setImage(img, path) {
|
||||
img.removeClass('default');
|
||||
img.off('error');
|
||||
img.on('error', function () {
|
||||
console.debug('Error loading image', path);
|
||||
$(this).off('error');
|
||||
$(this).attr('src', '');
|
||||
});
|
||||
}
|
||||
@ -626,7 +628,9 @@ async function setExpression(character, expression, force) {
|
||||
img.removeClass('default');
|
||||
img.off('error');
|
||||
img.on('error', function () {
|
||||
console.debug('Expression image error', sprite.path);
|
||||
$(this).attr('src', '');
|
||||
$(this).off('error');
|
||||
if (force && extension_settings.expressions.showDefault) {
|
||||
setDefault();
|
||||
}
|
||||
|
Reference in New Issue
Block a user