textileio / js-textile

Textile's JavaScript Libs. Home of ThreadDB, Buckets, and more. Available on npm as `@textile/hub`.
https://textileio.github.io/js-textile/docs
MIT License
85 stars 19 forks source link

Error calling document.save() more than once in ^0.2.1 #1217

Closed kwingram25 closed 2 years ago

kwingram25 commented 2 years ago

Encountering a breaking error when I attempt to call save() on any document type more than once per page load. Refreshing the page resets it. This is only happening in 0.2.1 and higher. Appears to be trying to add the schema more than once? Screenshot from 2022-02-18 16-41-11

carsonfarmer commented 2 years ago

Thanks for this report @kwingram25. I’m travelling at the moment, but will dig into this ASAP.

carsonfarmer commented 2 years ago

Ah ok, looking at the source and the diff from 0.2.0 -> 0.2.1, it looks like the schema validator is now "stateful" when it should not be.

carsonfarmer commented 2 years ago

Fixed with #1218 and now available as @textile/threaddb@0.2.3