We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45a98e2 commit e45c2b2Copy full SHA for e45c2b2
1 file changed
library.js
@@ -76,8 +76,14 @@
76
var maxQuoteLength = plugin.config['maxLength'] || 1024;
77
if (content.length > maxQuoteLength) { content = content.substring(0, maxQuoteLength) + '...'; }
78
79
- // Ensure absolute thumbnail URL:
80
- var thumbnail = data.user.picture.match(/^\//) ? forumURL + data.user.picture : data.user.picture;
+ // Ensure absolute thumbnail URL if an avatar exists:
+ var thumbnail = null;
81
+
82
+ if (data.user.picture && data.user.picture.match(/^\//)) {
83
+ thumbnail = forumURL + data.user.picture;
84
+ } else if (data.user.picture) {
85
+ thumbnail = data.user.picture;
86
+ }
87
88
// Add custom message:
89
var messageContent = plugin.config['messageContent'] || '';
0 commit comments