Netflix / falcor

A JavaScript library for efficient data fetching
http://netflix.github.io/falcor
Apache License 2.0
10.48k stars 446 forks source link

Fix model get dispose #933

Closed asyncanup closed 6 years ago

asyncanup commented 6 years ago

Currently, dispose a model.get().subscribe() does not abort the inner XHR calls made by that model.get This PR fixes that by threading the model get dispose through correctly to the get request's dispose.

This is the relevant commit that makes the fix: https://github.com/Netflix/falcor/commit/4c9ca5d8 Tests coming shortly.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.003%) to 92.373% when pulling 15d3eb3f0072ce5140dbed5b37ce23175f4d5334 on fix-get-dispose into 783b4da4423cc876abc0842566a2a87cee0fcbbf on master.

jhusain commented 6 years ago

This looks good pending test cases for the synchronous and asynchronous cases.

asyncanup commented 6 years ago

@jhusain there was already a test case for synchronous case, i added new ones for the asynchronous case.