Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GuillaumeCisco/redux-sagas-injector
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0601800d64355b381a41b0382a467c24bde0a0c8
Choose a base ref
...
head repository: GuillaumeCisco/redux-sagas-injector
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 842162207bac364ddafbf35a151de632faa3af80
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Sep 14, 2020

  1. Update dependencies

    GuillaumeCisco committed Sep 14, 2020
    Copy the full SHA
    8421622 View commit details
Showing with 600 additions and 323 deletions.
  1. +3 −0 CHANGELOG.md
  2. +31 −34 lib/redux-sagas-injector.js
  3. +564 −287 package-lock.json
  4. +2 −2 package.json
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

### 1.1.2
- Update dependencies

### 1.1.1
- remove console.log

65 changes: 31 additions & 34 deletions lib/redux-sagas-injector.js
Original file line number Diff line number Diff line change
@@ -48,43 +48,40 @@ var original_store = {};

function createAbortableSaga(key, saga) {
if (process.env.NODE_ENV === 'development') {
return (
/*#__PURE__*/
_regenerator["default"].mark(function main() {
var sagaTask, _ref, payload;

return _regenerator["default"].wrap(function main$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.fork)(saga);

case 2:
sagaTask = _context.sent;
_context.next = 5;
return (0, _effects.take)(CANCEL_SAGAS_HMR);

case 5:
_ref = _context.sent;
payload = _ref.payload;

if (!(payload === key)) {
_context.next = 10;
break;
}

return /*#__PURE__*/_regenerator["default"].mark(function main() {
var sagaTask, _yield$take, payload;

return _regenerator["default"].wrap(function main$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0, _effects.fork)(saga);

case 2:
sagaTask = _context.sent;
_context.next = 5;
return (0, _effects.take)(CANCEL_SAGAS_HMR);

case 5:
_yield$take = _context.sent;
payload = _yield$take.payload;

if (!(payload === key)) {
_context.next = 10;
return (0, _effects.cancel)(sagaTask);
break;
}

_context.next = 10;
return (0, _effects.cancel)(sagaTask);

case 10:
case "end":
return _context.stop();
}
case 10:
case "end":
return _context.stop();
}
}, main);
})
);
}
}, main);
});
} else {
return saga;
}
Loading