1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | 'use strict';
|
12 |
|
13 | var invariant = require("fbjs/lib/invariant");
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | function assertFragmentMap(componentName, fragmentSpec) {
|
19 | !(fragmentSpec && typeof fragmentSpec === 'object') ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not create Relay Container for `%s`. ' + 'Expected a set of GraphQL fragments, got `%s` instead.', componentName, fragmentSpec) : invariant(false) : void 0;
|
20 |
|
21 | for (var key in fragmentSpec) {
|
22 | if (fragmentSpec.hasOwnProperty(key)) {
|
23 | var fragment = fragmentSpec[key];
|
24 | !(fragment && (typeof fragment === 'object' || typeof fragment === 'function')) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not create Relay Container for `%s`. ' + 'The value of fragment `%s` was expected to be a fragment, got `%s` instead.', componentName, key, fragment) : invariant(false) : void 0;
|
25 | }
|
26 | }
|
27 | }
|
28 |
|
29 | module.exports = assertFragmentMap; |
\ | No newline at end of file |