mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 19:44:13 +00:00
Fix for #17348, Scrollable failing due to uglify-es
Summary: Fixes https://github.com/facebook/react-native/issues/17348 - Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'this._subscribableSubscriptions.forEach') Same existing tests applies, just added extra checks. This patch fixes the issue https://github.com/facebook/react-native/issues/17348 [ANDROID] [BUGFIX] [Subscribable] - Fix for https://github.com/facebook/react-native/issues/17348 [IOS] [BUGFIX] [Subscribable] - Fix for https://github.com/facebook/react-native/issues/17348 Closes https://github.com/facebook/react-native/pull/17463 Reviewed By: sahrens Differential Revision: D7062101 Pulled By: TheSavior fbshipit-source-id: 1306f4695ffc8748f674de70740ded09e1e390f7
This commit is contained in:
parent
ef9d1fba23
commit
b57a78c3de
@ -28,7 +28,9 @@ Subscribable.Mixin = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
this._subscribableSubscriptions.forEach(
|
// This null check is a fix for a broken version of uglify-es. Should be deleted eventually
|
||||||
|
// https://github.com/facebook/react-native/issues/17348
|
||||||
|
this._subscribableSubscriptions && this._subscribableSubscriptions.forEach(
|
||||||
(subscription) => subscription.remove()
|
(subscription) => subscription.remove()
|
||||||
);
|
);
|
||||||
this._subscribableSubscriptions = null;
|
this._subscribableSubscriptions = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user