-
Notifications
You must be signed in to change notification settings - Fork 182
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
support serialize undefined #54
Conversation
Hmm, could you add tests? |
index.js
Outdated
@@ -134,15 +146,15 @@ module.exports = function serialize(obj, options) { | |||
if (typeof str !== 'string') { | |||
return String(str); | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think the indent is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
published |
* Reject sourcemap before sending it to uglify At some point today, our builds started failing with a sourcemap error from this lib. Running the tests here makes it replicable: ``` ● allow to disable source maps DefaultsError: `sourcemap` is not a supported option at DefaultsError.get (eval at <anonymous> (node_modules/uglify-js/tools/node.js:20:1), <anonymous>:71:23) ``` This fixes the error by rejecting the option uglify is now rejecting before the whole thing crashes. * Use delete to mutate options object instead of a new copy * Upgrade serialize-javascript
I believe this change introduced a regression, will open an issue |
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.