(prop, mapping)
| 324 | } |
| 325 | |
| 326 | createInitialPromiseState(prop, mapping) { |
| 327 | return (meta) => { |
| 328 | if (typeof mapping.refreshing == 'function') { |
| 329 | const current = this.state.data[prop] |
| 330 | if (current) { |
| 331 | current.value = mapping.refreshing(current.value) |
| 332 | } |
| 333 | return PromiseState.refresh(current, meta) |
| 334 | } else if (mapping.refreshing) { |
| 335 | return PromiseState.refresh(this.state.data[prop], meta) |
| 336 | } else { |
| 337 | return PromiseState.create(meta) |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | createPromiseStateOnFulfillment(prop, mapping, startedAt) { |
| 343 | return (meta) => { |
no test coverage detected