| 18698 | var dummyState = {}; |
| 18699 | function noop() {} |
| 18700 | function makeSelectorStateful(sourceSelector, store) { |
| 18701 | // wrap the selector in an object that tracks its results between runs. |
| 18702 | var selector = { |
| 18703 | run: function runComponentSelector(props) { |
| 18704 | try { |
| 18705 | var nextProps = sourceSelector(store.getState(), props); |
| 18706 | if (nextProps !== selector.props || selector.error) { |
| 18707 | selector.shouldComponentUpdate = true; |
| 18708 | selector.props = nextProps; |
| 18709 | selector.error = null; |
| 18710 | } |
| 18711 | } catch (error) { |
| 18712 | selector.shouldComponentUpdate = true; |
| 18713 | selector.error = error; |
| 18714 | } |
| 18715 | } |
| 18716 | }; |
| 18717 | |
| 18718 | return selector; |
| 18719 | } |
| 18720 | |
| 18721 | function connectAdvanced( |
| 18722 | /* |