make module import safer

This commit is contained in:
Kevin Jahns
2015-12-02 20:04:59 +01:00
parent 334db3234b
commit 709779425c
3 changed files with 16 additions and 20 deletions

View File

@@ -550,7 +550,7 @@ module.exports = function (Y/* :any */) {
}
* addOperation (op) {
yield* this.os.put(op)
if (!this.store.y.connector.isDisconnected() && this.store.forwardAppliedOperations) {
if (!this.store.y.connector.isDisconnected() && this.store.forwardAppliedOperations && op.id[0] !== '_') {
// is connected, and this is not going to be send in addOperation
this.store.y.connector.broadcast({
type: 'update',