frappe/chat.js: Fix check for momentjs (#6310)
This commit is contained in:
parent
943b66714d
commit
a4935e9ae4
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue