mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
REFACTOR: Superfluous arguments passed to function resolveSize (#9678)
resolveSize accepts only one param
This commit is contained in:
parent
affc79bb68
commit
e74170cd9e
@ -29,7 +29,7 @@ function resolveSize(img) {
|
||||
}
|
||||
|
||||
// Detect square images and apply smaller onebox-avatar class
|
||||
function applySquareGenericOnebox($elem, normalizedUrl) {
|
||||
function applySquareGenericOnebox($elem) {
|
||||
if (!$elem.hasClass("whitelistedgeneric")) {
|
||||
return;
|
||||
}
|
||||
@ -43,10 +43,10 @@ function applySquareGenericOnebox($elem, normalizedUrl) {
|
||||
}
|
||||
|
||||
if (img.complete) {
|
||||
resolveSize(img, $elem, normalizedUrl);
|
||||
resolveSize(img);
|
||||
} else {
|
||||
$img.on("load.onebox", () => {
|
||||
resolveSize(img, $elem, normalizedUrl);
|
||||
resolveSize(img);
|
||||
$img.off("load.onebox");
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user