mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-12 02:32:18 +02:00
Switch to jQuery's hasClass instaid of checking direct class equality
This commit is contained in:
parent
c160852042
commit
10fefab279
|
@ -421,9 +421,9 @@ $(function() {
|
|||
// Remove the date-change marker we put at the top, because it may
|
||||
// not actually be a date change now
|
||||
var children = $(chan).children();
|
||||
if (children.eq(0).attr("class") === "date-marker") { // Check top most child
|
||||
if (children.eq(0).hasClass("date-marker")) { // Check top most child
|
||||
children.eq(0).remove();
|
||||
} else if (children.eq(0).attr("class") === "unread-marker" && children.eq(1).attr("class") === "date-marker") {
|
||||
} else if (children.eq(0).hasClass("unread-marker") && children.eq(1).hasClass("date-marker")) {
|
||||
// Otherwise the date-marker would get 'stuck' because of the new-message marker
|
||||
children.eq(1).remove();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue