From a4935e9ae414d2fcdc4cd25cb7e7bd99801f9c0d Mon Sep 17 00:00:00 2001 From: Karan Sharma Date: Tue, 30 Oct 2018 11:04:28 +0530 Subject: [PATCH] frappe/chat.js: Fix check for momentjs (#6310) --- frappe/public/js/frappe/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/chat.js b/frappe/public/js/frappe/chat.js index 177bd5913e..2502f9201c 100644 --- a/frappe/public/js/frappe/chat.js +++ b/frappe/public/js/frappe/chat.js @@ -93,10 +93,10 @@ frappe.datetime.datetime = class { * @description Frappe's datetime Class's constructor. */ constructor (instance, format = null) { - if ( typeof moment === undefined ) + if ( typeof moment === 'undefined' ) throw new frappe.ImportError(`Moment.js not installed.`) - this.moment = instance ? moment(instance, format) : moment() + this.moment = instance ? moment(instance, format) : moment() } /**