()
| 455 | const lazyId = nextPartId++; |
| 456 | const thenable: Thenable<any> = (x: any); |
| 457 | const retry = function () { |
| 458 | // While the first promise resolved, its value isn't necessarily what we'll |
| 459 | // resolve into because we might suspend again. |
| 460 | try { |
| 461 | const partJSON = serializeModel(value, lazyId); |
| 462 | // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above. |
| 463 | const data: FormData = formData; |
| 464 | data.append(formFieldPrefix + lazyId, partJSON); |
| 465 | pendingParts--; |
| 466 | if (pendingParts === 0) { |
| 467 | resolve(data); |
| 468 | } |
| 469 | } catch (reason) { |
| 470 | reject(reason); |
| 471 | } |
| 472 | }; |
| 473 | thenable.then(retry, retry); |
| 474 | return serializeByValueID(lazyId); |
| 475 | } else { |
nothing calls this directly
no test coverage detected