react-intl 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-intl.js +6 -2
- package/dist/react-intl.js.map +1 -1
- package/dist/react-intl.min.js +1 -1
- package/dist/react-intl.min.js.map +1 -1
- package/lib/index.es.js +6 -2
- package/lib/index.js +6 -2
- package/package.json +1 -1
- package/src/inject.js +2 -2
package/lib/index.es.js
CHANGED
|
@@ -556,13 +556,17 @@ function injectIntl(WrappedComponent) {
|
|
|
556
556
|
value: function getWrappedInstance() {
|
|
557
557
|
invariant(withRef, '[React Intl] To access the wrapped instance, ' + 'the `{withRef: true}` option must be set when calling: ' + '`injectIntl()`');
|
|
558
558
|
|
|
559
|
-
return this.
|
|
559
|
+
return this._wrappedInstance;
|
|
560
560
|
}
|
|
561
561
|
}, {
|
|
562
562
|
key: 'render',
|
|
563
563
|
value: function render() {
|
|
564
|
+
var _this2 = this;
|
|
565
|
+
|
|
564
566
|
return React.createElement(WrappedComponent, _extends({}, this.props, defineProperty({}, intlPropName, this.context.intl), {
|
|
565
|
-
ref: withRef ?
|
|
567
|
+
ref: withRef ? /* istanbul ignore next */function (ref) {
|
|
568
|
+
return _this2._wrappedInstance = ref;
|
|
569
|
+
} : null
|
|
566
570
|
}));
|
|
567
571
|
}
|
|
568
572
|
}]);
|
package/lib/index.js
CHANGED
|
@@ -563,13 +563,17 @@ function injectIntl(WrappedComponent) {
|
|
|
563
563
|
value: function getWrappedInstance() {
|
|
564
564
|
invariant(withRef, '[React Intl] To access the wrapped instance, ' + 'the `{withRef: true}` option must be set when calling: ' + '`injectIntl()`');
|
|
565
565
|
|
|
566
|
-
return this.
|
|
566
|
+
return this._wrappedInstance;
|
|
567
567
|
}
|
|
568
568
|
}, {
|
|
569
569
|
key: 'render',
|
|
570
570
|
value: function render() {
|
|
571
|
+
var _this2 = this;
|
|
572
|
+
|
|
571
573
|
return React__default.createElement(WrappedComponent, _extends({}, this.props, defineProperty({}, intlPropName, this.context.intl), {
|
|
572
|
-
ref: withRef ?
|
|
574
|
+
ref: withRef ? /* istanbul ignore next */function (ref) {
|
|
575
|
+
return _this2._wrappedInstance = ref;
|
|
576
|
+
} : null
|
|
573
577
|
}));
|
|
574
578
|
}
|
|
575
579
|
}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
package/src/inject.js
CHANGED
|
@@ -42,7 +42,7 @@ export default function injectIntl(WrappedComponent, options = {}) {
|
|
|
42
42
|
'`injectIntl()`'
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
return this.
|
|
45
|
+
return this._wrappedInstance;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
render() {
|
|
@@ -50,7 +50,7 @@ export default function injectIntl(WrappedComponent, options = {}) {
|
|
|
50
50
|
<WrappedComponent
|
|
51
51
|
{...this.props}
|
|
52
52
|
{...{[intlPropName]: this.context.intl}}
|
|
53
|
-
ref={withRef ?
|
|
53
|
+
ref={withRef ? /* istanbul ignore next */ (ref => this._wrappedInstance = ref) : null}
|
|
54
54
|
/>
|
|
55
55
|
);
|
|
56
56
|
}
|