(snapshotMap)
| 607 | } |
| 608 | |
| 609 | function getMapResult(snapshotMap) { |
| 610 | var data = Object.create(null); |
| 611 | for (var id in snapshotMap) { |
| 612 | var mapValue = snapshotMap[id]; |
| 613 | // fetchBulk / subscribeBulk map data can have either a Snapshot or an object |
| 614 | // `{error: Error | string}` as a value. |
| 615 | if (mapValue.error) { |
| 616 | // Transform errors to serialization-friendly objects. |
| 617 | data[id] = {error: getReplyErrorObject(mapValue.error)}; |
| 618 | } else { |
| 619 | data[id] = getSnapshotData(mapValue); |
| 620 | } |
| 621 | } |
| 622 | return {data: data}; |
| 623 | } |
| 624 | |
| 625 | function getSnapshotData(snapshot) { |
| 626 | var data = { |
no test coverage detected
searching dependent graphs…