mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-13 05:51:03 +00:00
add check if target element exists to getAvatar()
This commit is contained in:
parent
bc309abb0a
commit
7d35a50b20
@ -335,7 +335,11 @@ function _putResourceIntoStorage(locator, data) {
|
||||
}
|
||||
|
||||
// get avatar and set it in img.attr("src")
|
||||
// TODO rename to getAvatarImgToELem(), move nin theme related stuff to nin's theme_option.js
|
||||
function getAvatar( username, img ){
|
||||
if (!img.length)
|
||||
return;
|
||||
|
||||
if (username === 'nobody') {
|
||||
img.attr('src', ($.Options.theme.val === 'nin') ?
|
||||
'theme_nin/img/tornado_avatar.png' : 'img/tornado_avatar.png');
|
||||
|
Loading…
x
Reference in New Issue
Block a user