diff --git a/examples/textarea/index.html b/examples/textarea/index.html index 7931839b..8b0b474f 100644 --- a/examples/textarea/index.html +++ b/examples/textarea/index.html @@ -6,7 +6,7 @@ - + diff --git a/examples/textarea/index.js b/examples/textarea/index.js index 407e1e51..f51cef2d 100644 --- a/examples/textarea/index.js +++ b/examples/textarea/index.js @@ -7,7 +7,7 @@ Y({ }, connector: { name: 'websockets-client', - room: 'Textarea-example' + room: 'Textarea-example-dev' // url: '127.0.0.1:1234' }, sourceDir: '/bower_components', diff --git a/src/Connector.js b/src/Connector.js index e2ced372..c04e53f7 100644 --- a/src/Connector.js +++ b/src/Connector.js @@ -1,5 +1,3 @@ -/* @flow */ -'use strict' function canRead (auth) { return auth === 'read' || auth === 'write' } function canWrite (auth) { return auth === 'write' } diff --git a/src/Transaction.js b/src/Transaction.js index 335ca095..ed3f615f 100644 --- a/src/Transaction.js +++ b/src/Transaction.js @@ -96,7 +96,7 @@ export default function extendTransaction (Y) { send.push(Y.Struct[op.struct].encode(op)) } } - if (this.store.y.connector.isSynced && send.length > 0) { // TODO: && !this.store.forwardAppliedOperations (but then i don't send delete ops) + if (send.length > 0) { // TODO: && !this.store.forwardAppliedOperations (but then i don't send delete ops) // is connected, and this is not going to be send in addOperation this.store.y.connector.broadcastOps(send) } @@ -712,7 +712,7 @@ export default function extendTransaction (Y) { } * addOperation (op) { yield * this.os.put(op) - if (this.store.y.connector.isSynced && this.store.forwardAppliedOperations && typeof op.id[1] !== 'string') { + if (this.store.forwardAppliedOperations && typeof op.id[1] !== 'string') { // is connected, and this is not going to be send in addOperation this.store.y.connector.broadcastOps([op]) }