diff options
Diffstat (limited to 'src/services')
-rw-r--r-- | src/services/PollingBackend.js | 6 | ||||
-rw-r--r-- | src/services/SyncService.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/services/PollingBackend.js b/src/services/PollingBackend.js index 9101e3ded..09cfc728f 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -175,8 +175,8 @@ class PollingBackend { return } this.lock = true - let sendable = (typeof _sendable === 'function') ? _sendable() : _sendable - let steps = sendable.steps + const sendable = (typeof _sendable === 'function') ? _sendable() : _sendable + const steps = sendable.steps axios.post(endpointUrl('session/push', !!this._authority.options.shareToken), { documentId: this._authority.document.id, sessionId: this._authority.session.id, @@ -240,7 +240,7 @@ class PollingBackend { } carefulRetry() { - let newRetry = this.retryTime ? Math.min(this.retryTime * 2, MAX_PUSH_RETRY) : MIN_PUSH_RETRY + const newRetry = this.retryTime ? Math.min(this.retryTime * 2, MAX_PUSH_RETRY) : MIN_PUSH_RETRY if (newRetry > WARNING_PUSH_RETRY && this.retryTime < WARNING_PUSH_RETRY) { OC.Notification.showTemporary('Changes could not be sent yet') this._authority.emit('error', ERROR_TYPE.PUSH_FAILURE, {}) diff --git a/src/services/SyncService.js b/src/services/SyncService.js index cc63e980d..1e6233eca 100644 --- a/src/services/SyncService.js +++ b/src/services/SyncService.js @@ -166,7 +166,7 @@ class SyncService { } sendSteps(_sendable) { - let sendable = _sendable || sendableSteps(this.state) + const sendable = _sendable || sendableSteps(this.state) if (!sendable) { return } @@ -181,9 +181,9 @@ class SyncService { } _receiveSteps({ steps, document }) { - let newSteps = [] + const newSteps = [] for (let i = 0; i < steps.length; i++) { - let singleSteps = steps[i].data + const singleSteps = steps[i].data if (!Array.isArray(singleSteps)) { console.error('Invalid step data, skipping step', steps[i]) // TODO: recover |