MCPcopy Create free account
hub / github.com/microsoft/SandDance / validateProperties$1

Function validateProperties$1

docs/external/js/react-dom.development.js:5549–5565  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

5547
5548 var didWarnValueNull = false;
5549 function validateProperties$1(type, props) {
5550 {
5551 if (type !== 'input' && type !== 'textarea' && type !== 'select') {
5552 return;
5553 }
5554
5555 if (props != null && props.value === null && !didWarnValueNull) {
5556 didWarnValueNull = true;
5557
5558 if (type === 'select' && props.multiple) {
5559 error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
5560 } else {
5561 error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
5562 }
5563 }
5564 }
5565 }
5566
5567 var validateProperty$1 = function () {};
5568

Callers 1

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected