mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-02-16 16:10:54 -05:00
Replacing the ==
with ===
operator.
This commit is contained in:
parent
f6dbaa285f
commit
49e782a9eb
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
|||
(function($) {
|
||||
$.timeago = function(timestamp) {
|
||||
if (timestamp instanceof Date) return inWords(timestamp);
|
||||
else if (typeof timestamp == "string") return inWords($.timeago.parse(timestamp));
|
||||
else if (typeof timestamp === "string") return inWords($.timeago.parse(timestamp));
|
||||
else return inWords($.timeago.datetime(timestamp));
|
||||
};
|
||||
var $t = $.timeago;
|
||||
|
@ -92,7 +92,7 @@
|
|||
},
|
||||
datetime: function(elem) {
|
||||
// jQuery's `is()` doesn't play well with HTML5 in IE
|
||||
var isTime = $(elem).get(0).tagName.toLowerCase() == "time"; // $(elem).is("time");
|
||||
var isTime = $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
|
||||
var iso8601 = isTime ? $(elem).attr("datetime") : $(elem).attr("title");
|
||||
return $t.parse(iso8601);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue