Skip to content

Commit 5735a83

Browse files
tacoelhoethanshar
andauthored
Update Constants.ts (#1585)
* Update Constants.ts Fix #1582 * Update package.json Update RN version. * Update src/helpers/Constants.ts Co-authored-by: Ethan Sharabi <[email protected]> * Update package.json * Update package.json Co-authored-by: Ethan Sharabi <[email protected]>
1 parent 9dcf7fe commit 5735a83

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"react": "17.0.1",
100100
"react-autobind": "^1.0.6",
101101
"react-dom": "^15.4.2",
102-
"react-native": "0.64.1",
102+
"react-native":"0.64.1",
103103
"react-native-gesture-handler": "1.10.3",
104104
"react-native-haptic-feedback": "^1.11.0",
105105
"react-native-keyboard-tracking-view": "^5.6.1",

src/helpers/Constants.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ const constants = {
131131
},
132132
/* Dimensions */
133133
removeDimensionsEventListener: (callback: any) => {
134-
Dimensions.removeEventListener('change', callback);
134+
if (Dimensions.remove) {
135+
Dimensions.remove('change', callback);
136+
} else {
137+
Dimensions.removeEventListener('change', callback);
138+
}
135139
},
136140
/* Accessibility */
137141
get accessibility() {

0 commit comments

Comments
 (0)