Skip to content
Snippets Groups Projects
Commit 102555a3 authored by Kevin Jahns's avatar Kevin Jahns
Browse files

Release 0.8.3

parent ece8268e
No related branches found
No related tags found
No related merge requests found
Subproject commit a77eb39218a5815854daa07373f7f4597c3b9cb9
Subproject commit 3b8e148d8fee752b6318df2b940316c77936b812
{
"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": {
......
......@@ -93,8 +93,9 @@ function Y (opts/* :YOptions */) /* :Promise<YConfig> */ {
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 () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment