()
| 43 | } |
| 44 | |
| 45 | getActions() { |
| 46 | const manager = this; |
| 47 | const { dispatch } = this.store; |
| 48 | |
| 49 | function bindActionCreator(actionCreator) { |
| 50 | return (...args) => { |
| 51 | const action = actionCreator.apply(manager, args); |
| 52 | if (typeof action !== 'undefined') { |
| 53 | dispatch(action); |
| 54 | } |
| 55 | }; |
| 56 | } |
| 57 | |
| 58 | return Object.keys(dragDropActions).filter( |
| 59 | key => typeof dragDropActions[key] === 'function', |
| 60 | ).reduce((boundActions, key) => { |
| 61 | const action = dragDropActions[key]; |
| 62 | boundActions[key] = bindActionCreator(action); // eslint-disable-line no-param-reassign |
| 63 | return boundActions; |
| 64 | }, {}); |
| 65 | } |
| 66 | } |
no outgoing calls
no test coverage detected