Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for "Cannot read property 'style' of undefined" #2553

Open
ore-codes opened this issue Nov 15, 2024 · 0 comments
Open

Fix for "Cannot read property 'style' of undefined" #2553

ore-codes opened this issue Nov 15, 2024 · 0 comments

Comments

@ore-codes
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

After upgrading to Expo SDK 52 with Bridgeless mode. All the calendars were broken

Warning: TypeError: Cannot read property 'style' of undefined

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-calendars/src/agenda/index.js b/node_modules/react-native-calendars/src/agenda/index.js
index 8451908..3aad17a 100644
--- a/node_modules/react-native-calendars/src/agenda/index.js
+++ b/node_modules/react-native-calendars/src/agenda/index.js
@@ -28,7 +28,7 @@ export default class AgendaView extends Component {
     theme: PropTypes.object,
 
     // agenda container style
-    style: viewPropTypes.style,
+    style: PropTypes.style,
 
     // the list of items that have to be displayed in agenda. If you want to render item as empty date
     // the value of date key has to be an empty array []. If there exists no value for date key it is
diff --git a/node_modules/react-native-calendars/src/calendar/index.js b/node_modules/react-native-calendars/src/calendar/index.js
index 61b7a21..a2ead8d 100644
--- a/node_modules/react-native-calendars/src/calendar/index.js
+++ b/node_modules/react-native-calendars/src/calendar/index.js
@@ -30,7 +30,7 @@ class Calendar extends Component {
     markedDates: PropTypes.object,
 
     // Specify style for calendar container element. Default = {}
-    style: viewPropTypes.style,
+    style: PropTypes.style,
     // Initially visible month. Default = Date()
     current: PropTypes.any,
     // Minimum date that can be selected, dates before minDate will be grayed out. Default = undefined

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant