Code Monkey home page Code Monkey logo

Comments (11)

znewsham avatar znewsham commented on June 14, 2024 1

Confirmed - it's working, we've had it running in production (a busy site) for at least 3 months at this point

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

Hi @znewsham to which Blaze version did you upgrade?

from blaze.

znewsham avatar znewsham commented on June 14, 2024

[email protected]

but probably more importantly

[email protected]

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

Is it fixed if you upgrade to Blaze @2.71 and [email protected]

from blaze.

znewsham avatar znewsham commented on June 14, 2024

It doesn't look like it is - the problem is with the has function, which doesn't change between those two versions. In short, I don't think has should be used when looking at posOld - it should also be fairly easy to reproduce

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

You're right, I had a similar issue with non-reactive #each blocks in 2.7.0 but they were related to another cause.

The has is actually simply the replacement for _.has as taken from here: https://you-dont-need.github.io/You-Dont-Need-Lodash-Underscore/#/?id=_has

However, since _.has worked before, we should at least check how it works (https://underscorejs.org/docs/modules/has.html) and update the has function accordingly. What do you think?

Edit: we should also update the tests accordingly as it seems this regression was never catched by the tests somehow

from blaze.

znewsham avatar znewsham commented on June 14, 2024

The difference is, _.has doesn't expand a.b.c into ['a', 'b', 'c'] - so just like _.get - if you want to recurse, you have to split the string yourself. so _.has(obj, 'a.b.c') is equivalent to Object.hasOwnProperty.call(obj, 'a.b.c')

from blaze.

znewsham avatar znewsham commented on June 14, 2024

It looks like https://you-dont-need.github.io/You-Dont-Need-Lodash-Underscore/#/?id=_has is wrong - or maybe referencing a specific version?

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

I think it's neither. I really think it's extended but not documented as such

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

@znewsham do you mind helping out in #426 ? We need confirmation that the fix does remove this issue but does not introduce any side-effects

from blaze.

jankapunkt avatar jankapunkt commented on June 14, 2024

@znewsham fiendly ping. If you can confirm this basically running I will write one or two tests and pushb this to the release queue. If you find it hard to test we could also to an RC release

from blaze.

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.