mattkrick / cashay

:moneybag: Relay for the rest of us :moneybag:
MIT License
453 stars 28 forks source link

Fix Cannot read property 'length' of undefined #162

Closed theobat closed 7 years ago

theobat commented 7 years ago

@mattkrick, @dustinfarris,

After further investigations with @slaivyn we came to the following conclusions and PR:

When you have a query such as getCommentsByPostId supposed to return a List given an argument (id), if you query first with an argument and then with another one you'll have the error #156.

The reason is cashay searches for existing data in the same namespace : denormalizeStore maybeLiveQuery getFieldState

The last one returns subState = fieldState

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.09%) to 76.4% when pulling c6f04927d4a0f608fff6c1c0b111e35532fe5269 on theobat:master into 58c48e3f0fa24242db716b43b13f4a9098853f85 on mattkrick:master.

mattkrick commented 7 years ago

digging in now...

mattkrick commented 7 years ago

@theobat great find! live in 0.22.5