From 102555a3b085e9e4f702b7ff722a4c969ad26d23 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 15 Jan 2016 03:46:55 +0100 Subject: [PATCH] Release 0.8.3 --- dist | 2 +- package.json | 2 +- src/y.js | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dist b/dist index a77eb392..3b8e148d 160000 --- a/dist +++ b/dist @@ -1 +1 @@ -Subproject commit a77eb39218a5815854daa07373f7f4597c3b9cb9 +Subproject commit 3b8e148d8fee752b6318df2b940316c77936b812 diff --git a/package.json b/package.json index e9aaf134..f5583f3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "0.8.3", + "version": "0.8.4", "description": "A framework for real-time p2p shared editing on arbitrary complex data types", "main": "./src/y.js", "scripts": { diff --git a/src/y.js b/src/y.js index 36a813da..7f7d2485 100644 --- a/src/y.js +++ b/src/y.js @@ -93,8 +93,9 @@ function Y (opts/* :YOptions */) /* :Promise */ { Y.sourceDir = opts.sourceDir return Y.requestModules(modules).then(function () { return new Promise(function (resolve) { - var yconfig = new YConfig(opts, function () { - yconfig.db.whenUserIdSet(function () { + var yconfig = new YConfig(opts) + yconfig.db.whenUserIdSet(function () { + yconfig.init(function () { resolve(yconfig) }) }) @@ -111,6 +112,10 @@ class YConfig { constructor (opts, callback) { this.db = new Y[opts.db.name](this, opts.db) this.connector = new Y[opts.connector.name](this, opts.connector) + this.options = opts + } + init (callback) { + var opts = this.options var share = {} this.share = share this.db.requestTransaction(function * requestTransaction () {