Skip to content

Commit

Permalink
fixed: load react's dev prop-types instead of the prod empty one
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammy Saglam committed Mar 31, 2018
1 parent 77b4be2 commit fdf06f9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
var PropTypes = require('../prop-types');
// ------------------------------------------------
// load original React prop-types
// ------------------------------------------------
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
Symbol.for &&
Symbol.for('react.element')) ||
0xeac7;

var isValidElement = function(object) {
return typeof object === 'object' &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE;
};
var throwOnDirectAccess = true;
var PropTypes = require('../prop-types/factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
// ------------------------------------------------
// ------------------------------------------------
// ------------------------------------------------

var AxePropTypes = {};

Expand Down

0 comments on commit fdf06f9

Please sign in to comment.