fix: initialize notification helpers in lifecycle methods
- Fix 't is not a function' error during image upload by properly initializing notification helpers - Move notification helper initialization from class-level to lifecycle methods (created/mounted) - Affected components: ImageMethodDialog, SeedBackupView, QuickActionBvcBeginView, HelpNotificationsView - Ensures $notify is available when createNotifyHelpers() is called - Resolves notification errors in image upload functionality
This commit is contained in:
@@ -394,7 +394,7 @@ export default class HelpNotificationsView extends Vue {
|
||||
notifyingReminderTime = "";
|
||||
|
||||
// Notification helper system
|
||||
notify = createNotifyHelpers(this.$notify);
|
||||
notify!: ReturnType<typeof createNotifyHelpers>;
|
||||
|
||||
/**
|
||||
* Computed property for consistent button styling
|
||||
@@ -430,6 +430,9 @@ export default class HelpNotificationsView extends Vue {
|
||||
* Handles errors gracefully with proper logging without exposing sensitive data.
|
||||
*/
|
||||
async mounted() {
|
||||
// Initialize notification helpers
|
||||
this.notify = createNotifyHelpers(this.$notify);
|
||||
|
||||
try {
|
||||
const registration = await navigator.serviceWorker?.ready;
|
||||
const fullSub = await registration?.pushManager.getSubscription();
|
||||
|
||||
Reference in New Issue
Block a user