Code Monkey home page Code Monkey logo

Comments (8)

analog-nico avatar analog-nico commented on July 28, 2024

It boils down to line 9:

var c = defaultOptions, i;

Only the reference to the defaultOptions object is assigned to c. Since c is manipulated defaultOptions is too.

Would you mind introducing lodash? Then we could fix the bug changing the line to:

var c = _.cloneDeep(defaultOptions), i;

from request-promise.

analog-nico avatar analog-nico commented on July 28, 2024

@tyabonil Since the bug seemed to also influence issue #21 I fixed it with using lodash. If you don't like lodash as an additional dependency I can remove it and just write vanilla code.

Can you publish the new version? (Alternatively, you could just type npm owner add analog-nico request-promise into your terminal if you are willing to do so.)

from request-promise.

analog-nico avatar analog-nico commented on July 28, 2024

@tyabonil Sorry, I just screwed up. I did not see your update 3 hours ago. Give me a few minutes and I will revert to your version in which you already fixed the bug.

from request-promise.

analog-nico avatar analog-nico commented on July 28, 2024

I am confusing for sure. ;)

This bug got introduced with pull request #16. I thought you fixed it in your merge. However, that was just the code prior to pull request #16. So I don't revert my last commit.

from request-promise.

tyabonil avatar tyabonil commented on July 28, 2024

Thanks, see you copied the object and all looks good. Added a test where we pass a new options object, use 'url' instead of 'uri'

from request-promise.

tyabonil avatar tyabonil commented on July 28, 2024

@analog-nico Added you to npm

from request-promise.

analog-nico avatar analog-nico commented on July 28, 2024

Thanks a lot!

from request-promise.

analog-nico avatar analog-nico commented on July 28, 2024

Fix went into v0.2.4.

from request-promise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.