Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. "use strict";
  2. var ActionList_1 = require('../actions/ActionList');
  3. exports.things = function (state, action) {
  4. if (state === void 0) { state = []; }
  5. if (action.type === ActionList_1.ACTION_GET) {
  6. var inventoryAction = action;
  7. var idx = state.indexOf(inventoryAction.item);
  8. return state.slice(0, idx).concat(state.slice(idx + 1));
  9. }
  10. return state;
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement