mirror of
https://gitlab.com/commento/commento.git
synced 2026-11-01 01:16:21 -05:00
commento.js: do not set href if link is undefined
Fixes https://gitlab.com/commento/commento/issues/156
This commit is contained in:
1 parent
eec10491d6
commit
30772ec720
1 file changed
+9
-2
@@ -237,7 +237,12 @@
|
||||
|
||||
var loggedContainer = create("div");
|
||||
var loggedInAs = create("div");
|
||||
var name = create("a");
|
||||
var name;
|
||||
if (commenter.link !== "undefined") {
|
||||
name = create("a");
|
||||
} else {
|
||||
name = create("div");
|
||||
}
|
||||
var avatar;
|
||||
var logout = create("div");
|
||||
var color = colorGet(commenter.commenterHex + "-" + commenter.name);
|
||||
@@ -255,7 +260,9 @@
|
||||
onclick(logout, global.logout);
|
||||
|
||||
attrSet(loggedContainer, "style", "display: none");
|
||||
attrSet(name, "href", commenter.link);
|
||||
if (commenter.link !== "undefined") {
|
||||
attrSet(name, "href", commenter.link);
|
||||
}
|
||||
if (commenter.photo === "undefined") {
|
||||
avatar = create("div");
|
||||
avatar.style["background"] = color;
|
||||
|
||||
Reference in new issue
Block a user