mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: use root context if buildAvatar context is undefined
This commit is contained in:
@@ -284,6 +284,11 @@
|
||||
* component: overrides the default component (optional, default none)
|
||||
*/
|
||||
|
||||
// Try to use root context if passed-in userObj is undefined
|
||||
if (!userObj) {
|
||||
userObj = this;
|
||||
}
|
||||
|
||||
var attributes = [
|
||||
'alt="' + userObj.username + '"',
|
||||
'title="' + userObj.username + '"',
|
||||
|
||||
Reference in New Issue
Block a user