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

Should warp10 throw an error when it tries to serialize a function? #3

Open
patrick-steele-idem opened this issue Aug 2, 2017 · 0 comments

Comments

@patrick-steele-idem
Copy link

We are using warp10 to serialize data down from the server to the browser. Currently, warp10 will silently discard functions/methods on objects (this includes methods on the prototype chain). This leads to weird issues such as "Method not found" in the browser. In theory, in development we could check to see if this is happening and throw an error without incurring a runtime cost in production. Going this route would require introducing a build step for warp10 to support two different code paths (one for development and one for production). Possibly introduce a checkForFunctions() at the following line: https://github.com/patrick-steele-idem/warp10/blob/75a390910a563c7b1a60057c8177b4b0d61a05a5/src/stringifyPrepare.js#L83

@DylanPiercey DylanPiercey transferred this issue from marko-js/marko Feb 4, 2020
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

1 participant