Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wpforms-.../assets/js/integrat.../divi
File: formselector.es5.js
if ( !fn || reentry) {
[3000] Fix | Delete
return '';
[3001] Fix | Delete
}
[3002] Fix | Delete
[3003] Fix | Delete
{
[3004] Fix | Delete
var frame = componentFrameCache.get(fn);
[3005] Fix | Delete
[3006] Fix | Delete
if (frame !== undefined) {
[3007] Fix | Delete
return frame;
[3008] Fix | Delete
}
[3009] Fix | Delete
}
[3010] Fix | Delete
[3011] Fix | Delete
var control;
[3012] Fix | Delete
reentry = true;
[3013] Fix | Delete
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
[3014] Fix | Delete
[3015] Fix | Delete
Error.prepareStackTrace = undefined;
[3016] Fix | Delete
var previousDispatcher;
[3017] Fix | Delete
[3018] Fix | Delete
{
[3019] Fix | Delete
previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
[3020] Fix | Delete
// for warnings.
[3021] Fix | Delete
[3022] Fix | Delete
ReactCurrentDispatcher$1.current = null;
[3023] Fix | Delete
disableLogs();
[3024] Fix | Delete
}
[3025] Fix | Delete
[3026] Fix | Delete
try {
[3027] Fix | Delete
// This should throw.
[3028] Fix | Delete
if (construct) {
[3029] Fix | Delete
// Something should be setting the props in the constructor.
[3030] Fix | Delete
var Fake = function () {
[3031] Fix | Delete
throw Error();
[3032] Fix | Delete
}; // $FlowFixMe
[3033] Fix | Delete
[3034] Fix | Delete
[3035] Fix | Delete
Object.defineProperty(Fake.prototype, 'props', {
[3036] Fix | Delete
set: function () {
[3037] Fix | Delete
// We use a throwing setter instead of frozen or non-writable props
[3038] Fix | Delete
// because that won't throw in a non-strict mode function.
[3039] Fix | Delete
throw Error();
[3040] Fix | Delete
}
[3041] Fix | Delete
});
[3042] Fix | Delete
[3043] Fix | Delete
if (typeof Reflect === 'object' && Reflect.construct) {
[3044] Fix | Delete
// We construct a different control for this case to include any extra
[3045] Fix | Delete
// frames added by the construct call.
[3046] Fix | Delete
try {
[3047] Fix | Delete
Reflect.construct(Fake, []);
[3048] Fix | Delete
} catch (x) {
[3049] Fix | Delete
control = x;
[3050] Fix | Delete
}
[3051] Fix | Delete
[3052] Fix | Delete
Reflect.construct(fn, [], Fake);
[3053] Fix | Delete
} else {
[3054] Fix | Delete
try {
[3055] Fix | Delete
Fake.call();
[3056] Fix | Delete
} catch (x) {
[3057] Fix | Delete
control = x;
[3058] Fix | Delete
}
[3059] Fix | Delete
[3060] Fix | Delete
fn.call(Fake.prototype);
[3061] Fix | Delete
}
[3062] Fix | Delete
} else {
[3063] Fix | Delete
try {
[3064] Fix | Delete
throw Error();
[3065] Fix | Delete
} catch (x) {
[3066] Fix | Delete
control = x;
[3067] Fix | Delete
}
[3068] Fix | Delete
[3069] Fix | Delete
fn();
[3070] Fix | Delete
}
[3071] Fix | Delete
} catch (sample) {
[3072] Fix | Delete
// This is inlined manually because closure doesn't do it for us.
[3073] Fix | Delete
if (sample && control && typeof sample.stack === 'string') {
[3074] Fix | Delete
// This extracts the first frame from the sample that isn't also in the control.
[3075] Fix | Delete
// Skipping one frame that we assume is the frame that calls the two.
[3076] Fix | Delete
var sampleLines = sample.stack.split('\n');
[3077] Fix | Delete
var controlLines = control.stack.split('\n');
[3078] Fix | Delete
var s = sampleLines.length - 1;
[3079] Fix | Delete
var c = controlLines.length - 1;
[3080] Fix | Delete
[3081] Fix | Delete
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
[3082] Fix | Delete
// We expect at least one stack frame to be shared.
[3083] Fix | Delete
// Typically this will be the root most one. However, stack frames may be
[3084] Fix | Delete
// cut off due to maximum stack limits. In this case, one maybe cut off
[3085] Fix | Delete
// earlier than the other. We assume that the sample is longer or the same
[3086] Fix | Delete
// and there for cut off earlier. So we should find the root most frame in
[3087] Fix | Delete
// the sample somewhere in the control.
[3088] Fix | Delete
c--;
[3089] Fix | Delete
}
[3090] Fix | Delete
[3091] Fix | Delete
for (; s >= 1 && c >= 0; s--, c--) {
[3092] Fix | Delete
// Next we find the first one that isn't the same which should be the
[3093] Fix | Delete
// frame that called our sample function and the control.
[3094] Fix | Delete
if (sampleLines[s] !== controlLines[c]) {
[3095] Fix | Delete
// In V8, the first line is describing the message but other VMs don't.
[3096] Fix | Delete
// If we're about to return the first line, and the control is also on the same
[3097] Fix | Delete
// line, that's a pretty good indicator that our sample threw at same line as
[3098] Fix | Delete
// the control. I.e. before we entered the sample frame. So we ignore this result.
[3099] Fix | Delete
// This can happen if you passed a class to function component, or non-function.
[3100] Fix | Delete
if (s !== 1 || c !== 1) {
[3101] Fix | Delete
do {
[3102] Fix | Delete
s--;
[3103] Fix | Delete
c--; // We may still have similar intermediate frames from the construct call.
[3104] Fix | Delete
// The next one that isn't the same should be our match though.
[3105] Fix | Delete
[3106] Fix | Delete
if (c < 0 || sampleLines[s] !== controlLines[c]) {
[3107] Fix | Delete
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
[3108] Fix | Delete
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
[3109] Fix | Delete
// but we have a user-provided "displayName"
[3110] Fix | Delete
// splice it in to make the stack more readable.
[3111] Fix | Delete
[3112] Fix | Delete
[3113] Fix | Delete
if (fn.displayName && _frame.includes('<anonymous>')) {
[3114] Fix | Delete
_frame = _frame.replace('<anonymous>', fn.displayName);
[3115] Fix | Delete
}
[3116] Fix | Delete
[3117] Fix | Delete
{
[3118] Fix | Delete
if (typeof fn === 'function') {
[3119] Fix | Delete
componentFrameCache.set(fn, _frame);
[3120] Fix | Delete
}
[3121] Fix | Delete
} // Return the line we found.
[3122] Fix | Delete
[3123] Fix | Delete
[3124] Fix | Delete
return _frame;
[3125] Fix | Delete
}
[3126] Fix | Delete
} while (s >= 1 && c >= 0);
[3127] Fix | Delete
}
[3128] Fix | Delete
[3129] Fix | Delete
break;
[3130] Fix | Delete
}
[3131] Fix | Delete
}
[3132] Fix | Delete
}
[3133] Fix | Delete
} finally {
[3134] Fix | Delete
reentry = false;
[3135] Fix | Delete
[3136] Fix | Delete
{
[3137] Fix | Delete
ReactCurrentDispatcher$1.current = previousDispatcher;
[3138] Fix | Delete
reenableLogs();
[3139] Fix | Delete
}
[3140] Fix | Delete
[3141] Fix | Delete
Error.prepareStackTrace = previousPrepareStackTrace;
[3142] Fix | Delete
} // Fallback to just using the name if we couldn't make it throw.
[3143] Fix | Delete
[3144] Fix | Delete
[3145] Fix | Delete
var name = fn ? fn.displayName || fn.name : '';
[3146] Fix | Delete
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
[3147] Fix | Delete
[3148] Fix | Delete
{
[3149] Fix | Delete
if (typeof fn === 'function') {
[3150] Fix | Delete
componentFrameCache.set(fn, syntheticFrame);
[3151] Fix | Delete
}
[3152] Fix | Delete
}
[3153] Fix | Delete
[3154] Fix | Delete
return syntheticFrame;
[3155] Fix | Delete
}
[3156] Fix | Delete
function describeFunctionComponentFrame(fn, source, ownerFn) {
[3157] Fix | Delete
{
[3158] Fix | Delete
return describeNativeComponentFrame(fn, false);
[3159] Fix | Delete
}
[3160] Fix | Delete
}
[3161] Fix | Delete
[3162] Fix | Delete
function shouldConstruct(Component) {
[3163] Fix | Delete
var prototype = Component.prototype;
[3164] Fix | Delete
return !!(prototype && prototype.isReactComponent);
[3165] Fix | Delete
}
[3166] Fix | Delete
[3167] Fix | Delete
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
[3168] Fix | Delete
[3169] Fix | Delete
if (type == null) {
[3170] Fix | Delete
return '';
[3171] Fix | Delete
}
[3172] Fix | Delete
[3173] Fix | Delete
if (typeof type === 'function') {
[3174] Fix | Delete
{
[3175] Fix | Delete
return describeNativeComponentFrame(type, shouldConstruct(type));
[3176] Fix | Delete
}
[3177] Fix | Delete
}
[3178] Fix | Delete
[3179] Fix | Delete
if (typeof type === 'string') {
[3180] Fix | Delete
return describeBuiltInComponentFrame(type);
[3181] Fix | Delete
}
[3182] Fix | Delete
[3183] Fix | Delete
switch (type) {
[3184] Fix | Delete
case REACT_SUSPENSE_TYPE:
[3185] Fix | Delete
return describeBuiltInComponentFrame('Suspense');
[3186] Fix | Delete
[3187] Fix | Delete
case REACT_SUSPENSE_LIST_TYPE:
[3188] Fix | Delete
return describeBuiltInComponentFrame('SuspenseList');
[3189] Fix | Delete
}
[3190] Fix | Delete
[3191] Fix | Delete
if (typeof type === 'object') {
[3192] Fix | Delete
switch (type.$$typeof) {
[3193] Fix | Delete
case REACT_FORWARD_REF_TYPE:
[3194] Fix | Delete
return describeFunctionComponentFrame(type.render);
[3195] Fix | Delete
[3196] Fix | Delete
case REACT_MEMO_TYPE:
[3197] Fix | Delete
// Memo may contain any component type so we recursively resolve it.
[3198] Fix | Delete
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
[3199] Fix | Delete
[3200] Fix | Delete
case REACT_LAZY_TYPE:
[3201] Fix | Delete
{
[3202] Fix | Delete
var lazyComponent = type;
[3203] Fix | Delete
var payload = lazyComponent._payload;
[3204] Fix | Delete
var init = lazyComponent._init;
[3205] Fix | Delete
[3206] Fix | Delete
try {
[3207] Fix | Delete
// Lazy may contain any component type so we recursively resolve it.
[3208] Fix | Delete
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
[3209] Fix | Delete
} catch (x) {}
[3210] Fix | Delete
}
[3211] Fix | Delete
}
[3212] Fix | Delete
}
[3213] Fix | Delete
[3214] Fix | Delete
return '';
[3215] Fix | Delete
}
[3216] Fix | Delete
[3217] Fix | Delete
var loggedTypeFailures = {};
[3218] Fix | Delete
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
[3219] Fix | Delete
[3220] Fix | Delete
function setCurrentlyValidatingElement(element) {
[3221] Fix | Delete
{
[3222] Fix | Delete
if (element) {
[3223] Fix | Delete
var owner = element._owner;
[3224] Fix | Delete
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
[3225] Fix | Delete
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
[3226] Fix | Delete
} else {
[3227] Fix | Delete
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
[3228] Fix | Delete
}
[3229] Fix | Delete
}
[3230] Fix | Delete
}
[3231] Fix | Delete
[3232] Fix | Delete
function checkPropTypes(typeSpecs, values, location, componentName, element) {
[3233] Fix | Delete
{
[3234] Fix | Delete
// $FlowFixMe This is okay but Flow doesn't know it.
[3235] Fix | Delete
var has = Function.call.bind(hasOwnProperty);
[3236] Fix | Delete
[3237] Fix | Delete
for (var typeSpecName in typeSpecs) {
[3238] Fix | Delete
if (has(typeSpecs, typeSpecName)) {
[3239] Fix | Delete
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
[3240] Fix | Delete
// fail the render phase where it didn't fail before. So we log it.
[3241] Fix | Delete
// After these have been cleaned up, we'll let them throw.
[3242] Fix | Delete
[3243] Fix | Delete
try {
[3244] Fix | Delete
// This is intentionally an invariant that gets caught. It's the same
[3245] Fix | Delete
// behavior as without this statement except with a better message.
[3246] Fix | Delete
if (typeof typeSpecs[typeSpecName] !== 'function') {
[3247] Fix | Delete
// eslint-disable-next-line react-internal/prod-error-codes
[3248] Fix | Delete
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
[3249] Fix | Delete
err.name = 'Invariant Violation';
[3250] Fix | Delete
throw err;
[3251] Fix | Delete
}
[3252] Fix | Delete
[3253] Fix | Delete
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
[3254] Fix | Delete
} catch (ex) {
[3255] Fix | Delete
error$1 = ex;
[3256] Fix | Delete
}
[3257] Fix | Delete
[3258] Fix | Delete
if (error$1 && !(error$1 instanceof Error)) {
[3259] Fix | Delete
setCurrentlyValidatingElement(element);
[3260] Fix | Delete
[3261] Fix | Delete
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
[3262] Fix | Delete
[3263] Fix | Delete
setCurrentlyValidatingElement(null);
[3264] Fix | Delete
}
[3265] Fix | Delete
[3266] Fix | Delete
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
[3267] Fix | Delete
// Only monitor this failure once because there tends to be a lot of the
[3268] Fix | Delete
// same error.
[3269] Fix | Delete
loggedTypeFailures[error$1.message] = true;
[3270] Fix | Delete
setCurrentlyValidatingElement(element);
[3271] Fix | Delete
[3272] Fix | Delete
error('Failed %s type: %s', location, error$1.message);
[3273] Fix | Delete
[3274] Fix | Delete
setCurrentlyValidatingElement(null);
[3275] Fix | Delete
}
[3276] Fix | Delete
}
[3277] Fix | Delete
}
[3278] Fix | Delete
}
[3279] Fix | Delete
}
[3280] Fix | Delete
[3281] Fix | Delete
function setCurrentlyValidatingElement$1(element) {
[3282] Fix | Delete
{
[3283] Fix | Delete
if (element) {
[3284] Fix | Delete
var owner = element._owner;
[3285] Fix | Delete
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
[3286] Fix | Delete
setExtraStackFrame(stack);
[3287] Fix | Delete
} else {
[3288] Fix | Delete
setExtraStackFrame(null);
[3289] Fix | Delete
}
[3290] Fix | Delete
}
[3291] Fix | Delete
}
[3292] Fix | Delete
[3293] Fix | Delete
var propTypesMisspellWarningShown;
[3294] Fix | Delete
[3295] Fix | Delete
{
[3296] Fix | Delete
propTypesMisspellWarningShown = false;
[3297] Fix | Delete
}
[3298] Fix | Delete
[3299] Fix | Delete
function getDeclarationErrorAddendum() {
[3300] Fix | Delete
if (ReactCurrentOwner.current) {
[3301] Fix | Delete
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
[3302] Fix | Delete
[3303] Fix | Delete
if (name) {
[3304] Fix | Delete
return '\n\nCheck the render method of `' + name + '`.';
[3305] Fix | Delete
}
[3306] Fix | Delete
}
[3307] Fix | Delete
[3308] Fix | Delete
return '';
[3309] Fix | Delete
}
[3310] Fix | Delete
[3311] Fix | Delete
function getSourceInfoErrorAddendum(source) {
[3312] Fix | Delete
if (source !== undefined) {
[3313] Fix | Delete
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
[3314] Fix | Delete
var lineNumber = source.lineNumber;
[3315] Fix | Delete
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
[3316] Fix | Delete
}
[3317] Fix | Delete
[3318] Fix | Delete
return '';
[3319] Fix | Delete
}
[3320] Fix | Delete
[3321] Fix | Delete
function getSourceInfoErrorAddendumForProps(elementProps) {
[3322] Fix | Delete
if (elementProps !== null && elementProps !== undefined) {
[3323] Fix | Delete
return getSourceInfoErrorAddendum(elementProps.__source);
[3324] Fix | Delete
}
[3325] Fix | Delete
[3326] Fix | Delete
return '';
[3327] Fix | Delete
}
[3328] Fix | Delete
/**
[3329] Fix | Delete
* Warn if there's no key explicitly set on dynamic arrays of children or
[3330] Fix | Delete
* object keys are not valid. This allows us to keep track of children between
[3331] Fix | Delete
* updates.
[3332] Fix | Delete
*/
[3333] Fix | Delete
[3334] Fix | Delete
[3335] Fix | Delete
var ownerHasKeyUseWarning = {};
[3336] Fix | Delete
[3337] Fix | Delete
function getCurrentComponentErrorInfo(parentType) {
[3338] Fix | Delete
var info = getDeclarationErrorAddendum();
[3339] Fix | Delete
[3340] Fix | Delete
if (!info) {
[3341] Fix | Delete
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
[3342] Fix | Delete
[3343] Fix | Delete
if (parentName) {
[3344] Fix | Delete
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
[3345] Fix | Delete
}
[3346] Fix | Delete
}
[3347] Fix | Delete
[3348] Fix | Delete
return info;
[3349] Fix | Delete
}
[3350] Fix | Delete
/**
[3351] Fix | Delete
* Warn if the element doesn't have an explicit key assigned to it.
[3352] Fix | Delete
* This element is in an array. The array could grow and shrink or be
[3353] Fix | Delete
* reordered. All children that haven't already been validated are required to
[3354] Fix | Delete
* have a "key" property assigned to it. Error statuses are cached so a warning
[3355] Fix | Delete
* will only be shown once.
[3356] Fix | Delete
*
[3357] Fix | Delete
* @internal
[3358] Fix | Delete
* @param {ReactElement} element Element that requires a key.
[3359] Fix | Delete
* @param {*} parentType element's parent's type.
[3360] Fix | Delete
*/
[3361] Fix | Delete
[3362] Fix | Delete
[3363] Fix | Delete
function validateExplicitKey(element, parentType) {
[3364] Fix | Delete
if (!element._store || element._store.validated || element.key != null) {
[3365] Fix | Delete
return;
[3366] Fix | Delete
}
[3367] Fix | Delete
[3368] Fix | Delete
element._store.validated = true;
[3369] Fix | Delete
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
[3370] Fix | Delete
[3371] Fix | Delete
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
[3372] Fix | Delete
return;
[3373] Fix | Delete
}
[3374] Fix | Delete
[3375] Fix | Delete
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
[3376] Fix | Delete
// property, it may be the creator of the child that's responsible for
[3377] Fix | Delete
// assigning it a key.
[3378] Fix | Delete
[3379] Fix | Delete
var childOwner = '';
[3380] Fix | Delete
[3381] Fix | Delete
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
[3382] Fix | Delete
// Give the component that originally created this child.
[3383] Fix | Delete
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
[3384] Fix | Delete
}
[3385] Fix | Delete
[3386] Fix | Delete
{
[3387] Fix | Delete
setCurrentlyValidatingElement$1(element);
[3388] Fix | Delete
[3389] Fix | Delete
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
[3390] Fix | Delete
[3391] Fix | Delete
setCurrentlyValidatingElement$1(null);
[3392] Fix | Delete
}
[3393] Fix | Delete
}
[3394] Fix | Delete
/**
[3395] Fix | Delete
* Ensure that every element either is passed in a static location, in an
[3396] Fix | Delete
* array with an explicit keys property defined, or in an object literal
[3397] Fix | Delete
* with valid key property.
[3398] Fix | Delete
*
[3399] Fix | Delete
* @internal
[3400] Fix | Delete
* @param {ReactNode} node Statically passed child of any type.
[3401] Fix | Delete
* @param {*} parentType node's parent's type.
[3402] Fix | Delete
*/
[3403] Fix | Delete
[3404] Fix | Delete
[3405] Fix | Delete
function validateChildKeys(node, parentType) {
[3406] Fix | Delete
if (typeof node !== 'object') {
[3407] Fix | Delete
return;
[3408] Fix | Delete
}
[3409] Fix | Delete
[3410] Fix | Delete
if (isArray(node)) {
[3411] Fix | Delete
for (var i = 0; i < node.length; i++) {
[3412] Fix | Delete
var child = node[i];
[3413] Fix | Delete
[3414] Fix | Delete
if (isValidElement(child)) {
[3415] Fix | Delete
validateExplicitKey(child, parentType);
[3416] Fix | Delete
}
[3417] Fix | Delete
}
[3418] Fix | Delete
} else if (isValidElement(node)) {
[3419] Fix | Delete
// This element was passed in a valid location.
[3420] Fix | Delete
if (node._store) {
[3421] Fix | Delete
node._store.validated = true;
[3422] Fix | Delete
}
[3423] Fix | Delete
} else if (node) {
[3424] Fix | Delete
var iteratorFn = getIteratorFn(node);
[3425] Fix | Delete
[3426] Fix | Delete
if (typeof iteratorFn === 'function') {
[3427] Fix | Delete
// Entry iterators used to provide implicit keys,
[3428] Fix | Delete
// but now we print a separate warning for them later.
[3429] Fix | Delete
if (iteratorFn !== node.entries) {
[3430] Fix | Delete
var iterator = iteratorFn.call(node);
[3431] Fix | Delete
var step;
[3432] Fix | Delete
[3433] Fix | Delete
while (!(step = iterator.next()).done) {
[3434] Fix | Delete
if (isValidElement(step.value)) {
[3435] Fix | Delete
validateExplicitKey(step.value, parentType);
[3436] Fix | Delete
}
[3437] Fix | Delete
}
[3438] Fix | Delete
}
[3439] Fix | Delete
}
[3440] Fix | Delete
}
[3441] Fix | Delete
}
[3442] Fix | Delete
/**
[3443] Fix | Delete
* Given an element, validate that its props follow the propTypes definition,
[3444] Fix | Delete
* provided by the type.
[3445] Fix | Delete
*
[3446] Fix | Delete
* @param {ReactElement} element
[3447] Fix | Delete
*/
[3448] Fix | Delete
[3449] Fix | Delete
[3450] Fix | Delete
function validatePropTypes(element) {
[3451] Fix | Delete
{
[3452] Fix | Delete
var type = element.type;
[3453] Fix | Delete
[3454] Fix | Delete
if (type === null || type === undefined || typeof type === 'string') {
[3455] Fix | Delete
return;
[3456] Fix | Delete
}
[3457] Fix | Delete
[3458] Fix | Delete
var propTypes;
[3459] Fix | Delete
[3460] Fix | Delete
if (typeof type === 'function') {
[3461] Fix | Delete
propTypes = type.propTypes;
[3462] Fix | Delete
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
[3463] Fix | Delete
// Inner props are checked in the reconciler.
[3464] Fix | Delete
type.$$typeof === REACT_MEMO_TYPE)) {
[3465] Fix | Delete
propTypes = type.propTypes;
[3466] Fix | Delete
} else {
[3467] Fix | Delete
return;
[3468] Fix | Delete
}
[3469] Fix | Delete
[3470] Fix | Delete
if (propTypes) {
[3471] Fix | Delete
// Intentionally inside to avoid triggering lazy initializers:
[3472] Fix | Delete
var name = getComponentNameFromType(type);
[3473] Fix | Delete
checkPropTypes(propTypes, element.props, 'prop', name, element);
[3474] Fix | Delete
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
[3475] Fix | Delete
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
[3476] Fix | Delete
[3477] Fix | Delete
var _name = getComponentNameFromType(type);
[3478] Fix | Delete
[3479] Fix | Delete
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
[3480] Fix | Delete
}
[3481] Fix | Delete
[3482] Fix | Delete
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
[3483] Fix | Delete
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
[3484] Fix | Delete
}
[3485] Fix | Delete
}
[3486] Fix | Delete
}
[3487] Fix | Delete
/**
[3488] Fix | Delete
* Given a fragment, validate that it can only be provided with fragment props
[3489] Fix | Delete
* @param {ReactElement} fragment
[3490] Fix | Delete
*/
[3491] Fix | Delete
[3492] Fix | Delete
[3493] Fix | Delete
function validateFragmentProps(fragment) {
[3494] Fix | Delete
{
[3495] Fix | Delete
var keys = Object.keys(fragment.props);
[3496] Fix | Delete
[3497] Fix | Delete
for (var i = 0; i < keys.length; i++) {
[3498] Fix | Delete
var key = keys[i];
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function