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

Why the context is not saved? #26

Open
PaleNeutron opened this issue Apr 30, 2018 · 3 comments
Open

Why the context is not saved? #26

PaleNeutron opened this issue Apr 30, 2018 · 3 comments

Comments

@PaleNeutron
Copy link

PaleNeutron commented Apr 30, 2018

Imgur

See what I do in the screenshot, I definded a class in es5js and then call evaljs the first time, everything seems OK.
But when I tried to used the persistent instants, got identifier 'udm' undefined.

The strange things is, the code I pasted from document works well.

Is it a bug?

@amol-
Copy link
Owner

amol- commented Apr 30, 2018

I noticed you create a new interpreter instance after setting things in the first one.
Maybe the second interpreter is messing some global state of the first interpreter, I'll try to reproduce the issue.

@PaleNeutron
Copy link
Author

the second interpreter is just for test. I add it after I got the error.

@kelvinwop
Copy link

kelvinwop commented Dec 10, 2020

I also ran into this problem, functions aren't properly saved in the context
EDIT: it works now wtf???

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

3 participants