From 448b338e846a49b94135338518d09d0af03b133b Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Mon, 19 Mar 2018 12:05:04 +0530 Subject: [PATCH] check moment exists the right way --- frappe/public/js/frappe/misc/pretty_date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/misc/pretty_date.js b/frappe/public/js/frappe/misc/pretty_date.js index fc89e2dad6..52a791c089 100644 --- a/frappe/public/js/frappe/misc/pretty_date.js +++ b/frappe/public/js/frappe/misc/pretty_date.js @@ -4,7 +4,7 @@ function prettyDate(time, mini) { if (!time) { time = new Date(); } - if (moment) { + if ('moment' in window) { // use frappe.ImportError ;) let ret; if (frappe.sys_defaults && frappe.sys_defaults.time_zone) { ret = moment.tz(time, frappe.sys_defaults.time_zone).locale(frappe.boot.lang).fromNow(mini);