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

opaqueObject() seems to be broken in Vite React TS + SWC #163

Closed
jaekwak02 opened this issue Jul 28, 2023 · 1 comment
Closed

opaqueObject() seems to be broken in Vite React TS + SWC #163

jaekwak02 opened this issue Jul 28, 2023 · 1 comment

Comments

@jaekwak02
Copy link

jaekwak02 commented Jul 28, 2023

Observable does not seem to respect opaqueObject() at all in the latest version (1.6.4). This example does not work and logs a hundred errors to the console about circular references.

import { observable. opaqueObject } from '@legendapp/state'

const state$ = observable({ text: 'hi', body: opaqueObject(document.body) })

I tested this in a new Vite React TS + SWC project.

@jaekwak02 jaekwak02 changed the title opaqueObject() seems to be broken opaqueObject() seems to be broken in Vite React TS + SWC Jul 28, 2023
@jmeistrich
Copy link
Contributor

Thanks for finding that! opaqueObject was not preventing traversal in the constructor when looking for computeds. Fixed in 1.7.2

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

No branches or pull requests

2 participants