Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lorotext.toDelta must be attached? #661

Closed
sunnyawake5 opened this issue Feb 25, 2025 · 6 comments · Fixed by #665
Closed

lorotext.toDelta must be attached? #661

sunnyawake5 opened this issue Feb 25, 2025 · 6 comments · Fixed by #665

Comments

@sunnyawake5
Copy link

sunnyawake5 commented Feb 25, 2025

version:1.4.3

let lt=new LoroText
lt.insert(0,"abcdef")
console.log('delta',lt.toDelta())

throws:
loro_wasm_bg.js:6384 panicked at crates/loro-internal/src/handler.rs:1346:17:
not implemented: Detached text container does not have version id

Stack:

Error
at __wbg_new_abda76e883ba8a5f (http://localhost:5173/node_modules/.vite/deps/chunk-ZPNZOQIA.js?v=07954cb6:6507:15)
at wasm://wasm/00b9e10a:wasm-function[1327]:0x1844a2
at wasm://wasm/00b9e10a:wasm-function[8802]:0x2bee43
...

toDelta() need the container attached?

zxch3n added a commit that referenced this issue Feb 26, 2025
resolve lorotext.toDelta must be attached? #661
@zxch3n
Copy link
Member

zxch3n commented Feb 26, 2025

It will be fixed in the next version.

@zxch3n zxch3n closed this as completed Feb 26, 2025
zxch3n added a commit that referenced this issue Feb 26, 2025
* fix: detached loro text issues

resolve lorotext.toDelta must be attached? #661

* chore: changeset and update test

* chore: fix warnings
@sunnyawake5
Copy link
Author

sunnyawake5 commented Feb 27, 2025

i tried 1.4.4, but the error still occurs.
loro_wasm_bg.js:6392 panicked at crates/loro-internal/src/handler.rs:1346:17:
not implemented: Detached text container does not have version id

@zxch3n
Copy link
Member

zxch3n commented Feb 27, 2025

You're probably using a local cached version of Loro. If you're using vite, please use vite --force to start the dev server. Or rm the node_modules and test again.

@zxch3n
Copy link
Member

zxch3n commented Feb 27, 2025

Oh, sorry, it's not released yet. Will be fixed in 1.4.5

@sunnyawake5
Copy link
Author

ok.
we can close the bug when the corresponding version released?

@zxch3n
Copy link
Member

zxch3n commented Feb 27, 2025

np

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants