(key)
| 72 | } |
| 73 | |
| 74 | get(key) { |
| 75 | const hooks = this.hooks; |
| 76 | invariant(key in hooks, `plugin.get: hook ${key} cannot be got`); |
| 77 | if (key === 'extraReducers') { |
| 78 | return getExtraReducers(hooks[key]); |
| 79 | } else if (key === 'onReducer') { |
| 80 | return getOnReducer(hooks[key]); |
| 81 | } else { |
| 82 | return hooks[key]; |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | function getExtraReducers(hook) { |
no test coverage detected