commento.js: do not set href if link is undefined
Fixes https://gitlab.com/commento/commento/issues/156
This commit is contained in:
parent
eec10491d6
commit
30772ec720
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user