1
1
/**
2
- * React (with addons) v0.12.1
2
+ * React (with addons) v0.12.2
3
3
*/
4
4
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5
5
/**
@@ -431,7 +431,6 @@ module.exports = CSSCore;
431
431
*/
432
432
var isUnitlessNumber = {
433
433
columnCount: true,
434
- fillOpacity: true,
435
434
flex: true,
436
435
flexGrow: true,
437
436
flexShrink: true,
@@ -443,7 +442,11 @@ var isUnitlessNumber = {
443
442
orphans: true,
444
443
widows: true,
445
444
zIndex: true,
446
- zoom: true
445
+ zoom: true,
446
+
447
+ // SVG-related properties
448
+ fillOpacity: true,
449
+ strokeOpacity: true
447
450
};
448
451
449
452
/**
@@ -3661,7 +3664,11 @@ var HTMLDOMPropertyConfig = {
3661
3664
draggable: null,
3662
3665
encType: null,
3663
3666
form: MUST_USE_ATTRIBUTE,
3667
+ formAction: MUST_USE_ATTRIBUTE,
3668
+ formEncType: MUST_USE_ATTRIBUTE,
3669
+ formMethod: MUST_USE_ATTRIBUTE,
3664
3670
formNoValidate: HAS_BOOLEAN_VALUE,
3671
+ formTarget: MUST_USE_ATTRIBUTE,
3665
3672
frameBorder: MUST_USE_ATTRIBUTE,
3666
3673
height: MUST_USE_ATTRIBUTE,
3667
3674
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
@@ -3676,6 +3683,8 @@ var HTMLDOMPropertyConfig = {
3676
3683
list: MUST_USE_ATTRIBUTE,
3677
3684
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3678
3685
manifest: MUST_USE_ATTRIBUTE,
3686
+ marginHeight: null,
3687
+ marginWidth: null,
3679
3688
max: null,
3680
3689
maxLength: MUST_USE_ATTRIBUTE,
3681
3690
media: MUST_USE_ATTRIBUTE,
@@ -4400,7 +4409,7 @@ if ("production" !== "development") {
4400
4409
4401
4410
// Version exists only in the open-source version of React, not in Facebook's
4402
4411
// internal version.
4403
- React.version = '0.12.1 ';
4412
+ React.version = '0.12.2 ';
4404
4413
4405
4414
module.exports = React;
4406
4415
@@ -9907,7 +9916,7 @@ ReactElement.createElement = function(type, config, children) {
9907
9916
}
9908
9917
9909
9918
// Resolve default props
9910
- if (type.defaultProps) {
9919
+ if (type && type .defaultProps) {
9911
9920
var defaultProps = type.defaultProps;
9912
9921
for (propName in defaultProps) {
9913
9922
if (typeof props[propName] === 'undefined') {
@@ -10000,6 +10009,7 @@ var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations");
10000
10009
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
10001
10010
10002
10011
var monitorCodeUse = _dereq_("./monitorCodeUse");
10012
+ var warning = _dereq_("./warning");
10003
10013
10004
10014
/**
10005
10015
* Warn if there's no key explicitly set on dynamic arrays of children or
@@ -10197,6 +10207,15 @@ function checkPropTypes(componentName, propTypes, props, location) {
10197
10207
var ReactElementValidator = {
10198
10208
10199
10209
createElement: function(type, props, children) {
10210
+ // We warn in this case but don't throw. We expect the element creation to
10211
+ // succeed and there will likely be errors in render.
10212
+ ("production" !== "development" ? warning(
10213
+ type != null,
10214
+ 'React.createElement: type should not be null or undefined. It should ' +
10215
+ 'be a string (for DOM elements) or a ReactClass (for composite ' +
10216
+ 'components).'
10217
+ ) : null);
10218
+
10200
10219
var element = ReactElement.createElement.apply(this, arguments);
10201
10220
10202
10221
// The result can be nullish if a mock or a custom function is used.
@@ -10209,22 +10228,24 @@ var ReactElementValidator = {
10209
10228
validateChildKeys(arguments[i], type);
10210
10229
}
10211
10230
10212
- var name = type.displayName;
10213
- if (type.propTypes) {
10214
- checkPropTypes(
10215
- name,
10216
- type.propTypes,
10217
- element.props,
10218
- ReactPropTypeLocations.prop
10219
- );
10220
- }
10221
- if (type.contextTypes) {
10222
- checkPropTypes(
10223
- name,
10224
- type.contextTypes,
10225
- element._context,
10226
- ReactPropTypeLocations.context
10227
- );
10231
+ if (type) {
10232
+ var name = type.displayName;
10233
+ if (type.propTypes) {
10234
+ checkPropTypes(
10235
+ name,
10236
+ type.propTypes,
10237
+ element.props,
10238
+ ReactPropTypeLocations.prop
10239
+ );
10240
+ }
10241
+ if (type.contextTypes) {
10242
+ checkPropTypes(
10243
+ name,
10244
+ type.contextTypes,
10245
+ element._context,
10246
+ ReactPropTypeLocations.context
10247
+ );
10248
+ }
10228
10249
}
10229
10250
return element;
10230
10251
},
@@ -10242,7 +10263,7 @@ var ReactElementValidator = {
10242
10263
10243
10264
module.exports = ReactElementValidator;
10244
10265
10245
- },{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150}],60:[function(_dereq_,module,exports){
10266
+ },{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150,"./warning":160 }],60:[function(_dereq_,module,exports){
10246
10267
/**
10247
10268
* Copyright 2014, Facebook, Inc.
10248
10269
* All rights reserved.
@@ -14285,7 +14306,7 @@ var ReactTestUtils = {
14285
14306
mockComponent: function(module, mockTagName) {
14286
14307
mockTagName = mockTagName || module.mockTagName || "div";
14287
14308
14288
- var ConvenienceConstructor = React.createClass({displayName: ' ConvenienceConstructor' ,
14309
+ var ConvenienceConstructor = React.createClass({displayName: " ConvenienceConstructor" ,
14289
14310
render: function() {
14290
14311
return React.createElement(
14291
14312
mockTagName,
0 commit comments