Skip to content

Commit b57a78c

Browse files
iMagdyfacebook-github-bot
authored andcommitted
Fix for #17348, Scrollable failing due to uglify-es
Summary: Fixes #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 #17348 [ANDROID] [BUGFIX] [Subscribable] - Fix for #17348 [IOS] [BUGFIX] [Subscribable] - Fix for #17348 Closes #17463 Reviewed By: sahrens Differential Revision: D7062101 Pulled By: TheSavior fbshipit-source-id: 1306f4695ffc8748f674de70740ded09e1e390f7
1 parent ef9d1fb commit b57a78c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Libraries/Components/Subscribable.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Subscribable.Mixin = {
2828
},
2929

3030
componentWillUnmount: function() {
31-
this._subscribableSubscriptions.forEach(
31+
// This null check is a fix for a broken version of uglify-es. Should be deleted eventually
32+
// https://github.com/facebook/react-native/issues/17348
33+
this._subscribableSubscriptions && this._subscribableSubscriptions.forEach(
3234
(subscription) => subscription.remove()
3335
);
3436
this._subscribableSubscriptions = null;

0 commit comments

Comments
 (0)