remove @babel/plugin-proposal-class-properties
This commit is contained in:
@@ -14,6 +14,18 @@ export default class Collaboration extends Extension {
|
||||
}
|
||||
|
||||
init() {
|
||||
this.getSendableSteps = this.debounce(state => {
|
||||
const sendable = sendableSteps(state)
|
||||
|
||||
if (sendable) {
|
||||
this.options.onSendable({
|
||||
version: sendable.version,
|
||||
steps: sendable.steps.map(step => step.toJSON()),
|
||||
clientID: sendable.clientID,
|
||||
})
|
||||
}
|
||||
}, this.options.debounce)
|
||||
|
||||
this.editor.on('update', ({ state }) => {
|
||||
this.getSendableSteps(state)
|
||||
})
|
||||
@@ -50,18 +62,6 @@ export default class Collaboration extends Extension {
|
||||
]
|
||||
}
|
||||
|
||||
getSendableSteps = this.debounce(state => {
|
||||
const sendable = sendableSteps(state)
|
||||
|
||||
if (sendable) {
|
||||
this.options.onSendable({
|
||||
version: sendable.version,
|
||||
steps: sendable.steps.map(step => step.toJSON()),
|
||||
clientID: sendable.clientID,
|
||||
})
|
||||
}
|
||||
}, this.options.debounce)
|
||||
|
||||
debounce(fn, delay) {
|
||||
let timeout
|
||||
return function (...args) {
|
||||
|
||||
Reference in New Issue
Block a user