Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit aa46fd3

Browse files
committed
fix: remove incorrect prop validation instance method and fix actual function
1 parent 02cc76c commit aa46fd3

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/createAppContainer.js

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function validateProps(props) {
3434
screenProps,
3535
persistNavigationState,
3636
loadNavigationState,
37+
theme,
3738
...containerProps
3839
} = props;
3940
/* eslint-enable no-unused-vars */
@@ -142,28 +143,6 @@ export default function createNavigationContainer(Component) {
142143
return isStateful(this.props);
143144
}
144145

145-
_validateProps(props) {
146-
if (this._isStateful()) {
147-
return;
148-
}
149-
150-
// eslint-disable-next-line no-unused-vars
151-
const { navigation, screenProps, theme, ...containerProps } = props;
152-
153-
const keys = Object.keys(containerProps);
154-
155-
if (keys.length !== 0) {
156-
throw new Error(
157-
'This navigator has both navigation and container props, so it is ' +
158-
`unclear if it should own its own state. Remove props: "${keys.join(
159-
', '
160-
)}" ` +
161-
'if the navigator should get its state from the navigation prop. If the ' +
162-
'navigator should maintain its own state, do not pass a navigation prop.'
163-
);
164-
}
165-
}
166-
167146
_handleOpenURL = ({ url }) => {
168147
const { enableURLHandling, uriPrefix } = this.props;
169148
if (enableURLHandling === false) {

0 commit comments

Comments
 (0)