yjs / y-webrtc

WebRTC Connector for Yjs
MIT License
458 stars 111 forks source link

this.getStateVector is not a function #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello,

I am currently trying to use yjs, the y-xmpp connector looks like it's working fine but when I try to use the same code for the WebRTC implementation it crashes.

The error appears when I execute the following code on more than one browser:

var options = {}
var connector = new Y.WebRTC("hello", options);
var y = new Y(connector)

If I run this piece of code on a single browser no error is prompted, while if I run it on two or more browsers it return the this.getStateVector is not a function error. It looks like that the error appears when I try to create the y object while the connector has already some connection.

dmonad commented 9 years ago

Hi sorry for that. I fixed this behavior! Please wait until I deployed it to npm/bower/website

dmonad commented 9 years ago

By the way. Though this occured only in y-webrtc, I had to fix it in the yjs repository. So you have to update yjs!