lingui-react
Advanced tools
Comparing version 0.12.3 to 0.12.4
@@ -19,7 +19,3 @@ 'use strict'; | ||
if (render) { | ||
return _react2.default.isValidElement(render) | ||
// $FlowIgnore: Don't know how to handle this type union | ||
? _react2.default.cloneElement(render, {}, children) | ||
// $FlowIgnore: Don't know how to handle this type union | ||
: _react2.default.createElement(render, { translation: children }); | ||
return _react2.default.isValidElement(render) ? _react2.default.cloneElement(render, {}, children) : _react2.default.createElement(render, { translation: children }); | ||
} | ||
@@ -26,0 +22,0 @@ |
@@ -30,4 +30,2 @@ 'use strict'; | ||
return function (WrappedComponent) { | ||
var _class, _temp2; | ||
if (process.env.NODE_ENV !== 'production') { | ||
@@ -44,4 +42,3 @@ if (typeof options === 'function' || _react2.default.isValidElement(options)) { | ||
return _temp2 = _class = function (_React$Component) { | ||
var WithI18n = function (_React$Component) { | ||
_inherits(WithI18n, _React$Component); | ||
@@ -103,5 +100,3 @@ | ||
i18n = _getI18n3.i18n; | ||
// $FlowIgnore: https://github.com/facebook/flow/issues/3241 | ||
return _react2.default.createElement(WrappedComponent, _extends({ ref: this.setWrappedInstance }, this.props, { i18n: i18n })); | ||
@@ -112,6 +107,11 @@ } | ||
return WithI18n; | ||
}(_react2.default.Component), _class.contextTypes = { | ||
}(_react2.default.Component); | ||
WithI18n.contextTypes = { | ||
i18nManager: _propTypes2.default.object | ||
}, _temp2; | ||
}; | ||
return WithI18n; | ||
}; | ||
}; |
{ | ||
"name": "lingui-react", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"description": "React components for translations", | ||
@@ -35,4 +35,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"lingui-formats": "^0.4.3", | ||
"lingui-i18n": "^0.6.4", | ||
"lingui-formats": "^0.4.4", | ||
"lingui-i18n": "^0.6.5", | ||
"prop-types": "^15.5.10" | ||
@@ -39,0 +39,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93802
920
Updatedlingui-formats@^0.4.4
Updatedlingui-i18n@^0.6.5