-
-
Notifications
You must be signed in to change notification settings - Fork 170
Open
yorkie-team/yorkie-js-sdk
#996Labels
critical 🚨Event that must be dealt with to ensure the systemEvent that must be dealt with to ensure the system
Description
What happened:
First of all, I really appreciate about this beautiful opensource.
I'm making something using yorkie.
That is what i want.
Maintaining client
, change attached document
.
For this, I need to generate client and document first.
And attach document of course.
If i wanna change document, I detach a document which I attached right before.
Lastly, I generate new document, and try to attach document.
But have a problem to do this.
What you expected to happen:
Maintaining client
, change attached document
.
How to reproduce it (as minimally and precisely as possible):
You can check a problem with this code.
import yorkie from 'yorkie-js-sdk';
async function main() {
const client = new yorkie.Client('https://api.yorkie.dev', {
apiKey,
});
await client.activate();
const doc = new yorkie.Document('my-first-document');
const doc2 = new yorkie.Document('my-first-document2');
// first doc attach
await client.attach(doc);
console.log('attach doc1');
await client.detach(doc);
console.log('detach doc1');
// second doc attach
await client.attach(doc2);
console.log('attach doc2');
await client.detach(doc2);
console.log('detach doc2');
// again first doc attach
await client.attach(doc);
console.log('attach doc1');
}
main();
Anything else we need to know?:
Environment:
- Operating system:
- Browser and version:
- Yorkie version (use
yorkie version
): - Yorkie JS SDK version:
hackerwinshackerwinskrapie
Metadata
Metadata
Assignees
Labels
critical 🚨Event that must be dealt with to ensure the systemEvent that must be dealt with to ensure the system
Type
Projects
Status
Backlog