@@ -171,6 +171,9 @@ var JobProvider = function (_Component) {
171171 var rehydration = _this2 . rehydrateState . jobs [ id ] ;
172172 delete _this2 . rehydrateState . jobs [ id ] ;
173173 return rehydration ;
174+ } ,
175+ removeRehydrate : function removeRehydrate ( id ) {
176+ delete _this2 . rehydrateState . jobs [ id ] ;
174177 }
175178 }
176179 } ;
@@ -208,7 +211,8 @@ JobProvider.childContextTypes = {
208211 getNextId : _react . PropTypes . func . isRequired ,
209212 register : _react . PropTypes . func . isRequired ,
210213 get : _react . PropTypes . func . isRequired ,
211- getRehydrate : _react2 . default . PropTypes . func . isRequired
214+ getRehydrate : _react2 . default . PropTypes . func . isRequired ,
215+ removeRehydrate : _react2 . default . PropTypes . func . isRequired
212216 } ) . isRequired
213217} ;
214218exports . default = JobProvider ;
@@ -329,6 +333,10 @@ function withJob(config) {
329333 if ( ! this . state . completed ) {
330334 this . resolveWork ( this . props ) ;
331335 }
336+
337+ if ( this . context . jobs && env === 'browser' ) {
338+ this . context . jobs . removeRehydrate ( id ) ;
339+ }
332340 }
333341 } , {
334342 key : 'componentWillUnmount' ,
@@ -370,7 +378,8 @@ function withJob(config) {
370378 getNextId : _react . PropTypes . func . isRequired ,
371379 register : _react . PropTypes . func . isRequired ,
372380 get : _react . PropTypes . func . isRequired ,
373- getRehydrate : _react2 . default . PropTypes . func . isRequired
381+ getRehydrate : _react2 . default . PropTypes . func . isRequired ,
382+ removeRehydrate : _react2 . default . PropTypes . func . isRequired
374383 } )
375384 } ;
376385
0 commit comments