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

Bug when used an object with a function and a variable with a function and destructuring #118

Open
leobastiani opened this issue May 1, 2021 · 1 comment

Comments

@leobastiani
Copy link

https://runkit.com/leobastiani/javascript-serialize-bug-variable-function-destructuring

Try the following code:

const serialize = require("javascript-serialize"); // version 1.6.1
const obj = {
  someKey() {
    const someVariable = ({ someParam }) => {};
  },
};
serialize(obj);

and get: { "someKey": "someKey() { ...

@bpstrngr
Copy link

bpstrngr commented Jul 12, 2021

i ran into this too, to me it happens without the function using destructuring too. (v6.0.0)

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