mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: TypeError cannot read properties of undefined (reading '$store') (#9777)
This issue is an extremely narrow edge case that does not affect the app functionality. It occurs here 1. `executeRecurringNotification` is the method that sets a timeout of 30 seconds and pings as required 2. This method is triggered when one of the following events happen `click`, `touchstart`, `keypress`, `keydown` 3. The class in question is initalized before the Vue app is mounted in `application.js`, the vue app is mounted on `window.onload` event 4. In a case where the Vue app is not created (i.e. `window.onload` event is not fired) within 30 seconds of a user input, this error occurs.
This commit is contained in:
@@ -52,6 +52,10 @@ class DashboardAudioNotificationHelper {
|
||||
};
|
||||
|
||||
executeRecurringNotification = () => {
|
||||
if (!window.WOOT || !window.WOOT.$store) {
|
||||
this.clearSetTimeout();
|
||||
return;
|
||||
}
|
||||
const mineConversation = window.WOOT.$store.getters.getMineChats({
|
||||
assigneeType: 'me',
|
||||
status: 'open',
|
||||
|
||||
Reference in New Issue
Block a user