From 10fefab2797d08957b420786601070b2ce2cbdda Mon Sep 17 00:00:00 2001 From: stepie22 Date: Thu, 1 Dec 2016 13:25:49 +0200 Subject: [PATCH] Switch to jQuery's hasClass instaid of checking direct class equality --- client/js/lounge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index dad513f4..dea07450 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -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(); }