remove @babel/plugin-proposal-class-properties

This commit is contained in:
Philipp Kühn
2019-05-06 10:27:40 +02:00
parent 1df723d269
commit d0da644b90
4 changed files with 12 additions and 34 deletions

View File

@@ -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) {