1 | /**
|
2 | * Copyright (c) Facebook, Inc. and its affiliates.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | * @format
|
8 | */
|
9 | ;
|
10 |
|
11 | var invariant = require("fbjs/lib/invariant");
|
12 |
|
13 | /**
|
14 | * Returns original component class wrapped by e.g. createFragmentContainer
|
15 | */
|
16 | function unwrapContainer(ComponentClass) {
|
17 | // $FlowExpectedError
|
18 | var unwrapped = ComponentClass.__ComponentClass;
|
19 | !(unwrapped != null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not find component for %s, is it a Relay container?', ComponentClass.displayName || ComponentClass.name) : invariant(false) : void 0;
|
20 | return unwrapped;
|
21 | }
|
22 |
|
23 | module.exports = unwrapContainer; |
\ | No newline at end of file |