toeverything / blocksuite

🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.
https://blocksuite.io
Mozilla Public License 2.0
4.11k stars 358 forks source link

Bug in DocCollection #7481

Closed raymonddaikon closed 2 weeks ago

raymonddaikon commented 2 weeks ago

Something broke in between 0.15.0-canary-202406061150-5c5d6fa and 0.15.0-canary-202406280242-21d8d15 that causes DocCollection to not be able to createDoc. I'm having trouble pinning down the exact changes between these two versions but all subsequent versions after 0.15.0-canary-202406280242-21d8d15 including the latest 0.15.0 release includes this bug.

fourdim commented 2 weeks ago

I'm sorry that the documentation is not up to date. Add a line:

collection.meta.initialize();

should solve this issue.

jizhi0v0 commented 2 weeks ago
```ts
collection.meta.initialize();

It works!

fourdim commented 2 weeks ago

New API updates are described in https://github.com/toeverything/blocksuite/pull/7455