You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
12345678910111213
  1. var isProduction = process.env.NODE_ENV === 'production';
  2. var prefix = 'Invariant failed';
  3. function invariant(condition, message) {
  4. if (condition) {
  5. return;
  6. }
  7. if (isProduction) {
  8. throw new Error(prefix);
  9. }
  10. throw new Error(prefix + ": " + (message || ''));
  11. }
  12. export default invariant;