mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 13:44:04 +00:00
Change TextInput prop check to print instead of throw
Summary: Follow up of https://github.com/facebook/react-native/pull/8499! Open to discussion Motivation: See https://github.com/facebook/react-native/pull/8499#issuecomment-230004068 Goal is to have the same failure mode in dev and prod. /cc ide Closes https://github.com/facebook/react-native/pull/8757 Differential Revision: D3558991 fbshipit-source-id: c7d133f958e67ab23da486b1ffcb8f9963509b79
This commit is contained in:
parent
e8a388a60a
commit
90c2605950
@ -27,6 +27,7 @@ const TimerMixin = require('react-timer-mixin');
|
||||
const TouchableWithoutFeedback = require('TouchableWithoutFeedback');
|
||||
const UIManager = require('UIManager');
|
||||
const View = require('View');
|
||||
const warning = require('fbjs/lib/warning');
|
||||
|
||||
const emptyFunction = require('fbjs/lib/emptyFunction');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
@ -550,9 +551,10 @@ const TextInput = React.createClass({
|
||||
if (__DEV__) {
|
||||
for (var propKey in onlyMultiline) {
|
||||
if (props[propKey]) {
|
||||
throw new Error(
|
||||
const error = new Error(
|
||||
'TextInput prop `' + propKey + '` is only supported with multiline.'
|
||||
);
|
||||
warning(false, '%s', error.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user