frappe/chat.js: Fix check for momentjs (#6310)

This commit is contained in:
Karan Sharma 2018-10-30 11:04:28 +05:30 committed by Rushabh Mehta
parent 943b66714d
commit a4935e9ae4

View file

@ -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()
}
/**