The error TypeError: Cannot read properties of undefined (reading 'length') indicates that the code is trying to access the length property of a variable that is currently undefined. This is happening within the bookingpress_vue.min.js file, suggesting that the issue is related to the BookingPress plugin's interaction with Vue.js. The stack trace shows the error occurring during a Vue rendering cycle (_render, r, fn.get, fn.run), specifically within an eval call, which often happens when Vue processes templates or computed properties. The most likely cause is that a data property or computed property that is expected to be an array or string (which have a length property) is undefined at the moment the template tries to access its length. This could be because data hasn't been loaded yet, an API call failed, or the property wasn't initialized correctly.
To confirm this, you could:
my-bookings/:2701).data or if they are populated asynchronously (e.g., via an API call).eval context might make this tricky) or in the mounted hook where data is likely being fetched (my-bookings/:2144). Inspect the value of the variable before the length property is accessed.The fix involves ensuring that the variable you are trying to access the length property on is not undefined before you try to access length. You can achieve this using conditional rendering in your Vue template or by adding checks in your JavaScript code.
Option 1: Template Check (Recommended if accessing length in the template)
If you are using v-for or displaying the length in your template, add a check to ensure the variable exists: