fix(chat): Separate setup code from constructor (#6363)
- to avoid class transpilation issue
This commit is contained in:
parent
0e0c103a32
commit
755bb6b63f
1 changed files with 9 additions and 2 deletions
|
|
@ -1404,6 +1404,11 @@ class extends Component {
|
|||
constructor (props) {
|
||||
super (props)
|
||||
|
||||
this.setup(props)
|
||||
this.make()
|
||||
}
|
||||
|
||||
setup (props) {
|
||||
// room actions
|
||||
this.room = { }
|
||||
this.room.add = rooms => {
|
||||
|
|
@ -1483,8 +1488,6 @@ class extends Component {
|
|||
}
|
||||
|
||||
this.state = { ...frappe.Chat.Widget.defaultState, ...props }
|
||||
|
||||
this.make()
|
||||
}
|
||||
|
||||
make ( ) {
|
||||
|
|
@ -1755,6 +1758,10 @@ class extends Component {
|
|||
constructor (props) {
|
||||
super (props)
|
||||
|
||||
this.setup(props);
|
||||
}
|
||||
|
||||
setup (props) {
|
||||
this.toggle = this.toggle.bind(this)
|
||||
|
||||
this.state = frappe.Chat.Widget.Popper.defaultState
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue