Merge pull request #5215 from achillesrasquinha/check-moment
check moment exists the right way
This commit is contained in:
commit
4f4bf25d92
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue