From 4b0f50f57e7916354968075eed094b8da7e9b032 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Tue, 18 Aug 2015 11:02:14 -0400 Subject: [PATCH] closes #3448 --- public/src/utils.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/src/utils.js b/public/src/utils.js index 66ee10f6cf..4b3b4464fc 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -206,9 +206,13 @@ overrideTimeago: function() { var timeagoFn = $.fn.timeago; $.fn.timeago = function() { - timeagoFn.apply(this, arguments).each(function() { - $(this).attr('title', (new Date($(this).attr('title'))).toString()); - }); + var els = timeagoFn.apply(this, arguments); + + if (els) { + els.each(function() { + $(this).attr('title', (new Date($(this).attr('title'))).toString()); + }); + } }; },