Uncaught TypeError: Cannot read property dismiss of null (alert.js)
See original GitHub issueI keep getting random events where the error is:
Uncaught TypeError: Cannot read property 'dismiss' of null
The error is coming from the Alert default module on Line 113, in alert.js:
hide_alert: function(sender) {
//Dismiss alert and remove from this.alerts
this.alerts[sender.name].dismiss(); // <<========= LINE 113 !
this.alerts[sender.name] = null;
//Remove overlay
var overlay = document.getElementById("overlay");
overlay.parentNode.removeChild(overlay);
},
@MichMich
Does this have to be null
or can it also be set to ""
or something else?
Any ideas how to fix or work around this?
I’m surprised nobody else has reported this issue, so I want to eliminate that it is a problem with my module.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'dismiss' of undefined in ionic ...
I created below class to handle show hide of loading in my ionic application. loading.service.ts import { Injectable } from '@angular/core'; ...
Read more >Uncaught TypeError: Cannot read property of null - iDiallo
It says it cannot set property disabled of null. Where is disabled used? They are the elements with id btConsulta, btDescargar and btHist....
Read more >TypeError: Cannot read property 'dismiss' of undefined
Hi everyone! I have implemented a service with two methods for creating and closing a loading controller, like this.
Read more >How to fix this " Uncaught TypeError: Cannot read properties ...
Scenario 1 is that it is trying to read data from the server response and no data is available. Scenario 2 is that...
Read more >How to deal or remove "Cannot read property 'destroy' of null"
"Cannot read property 'destroy' of null" - This error has occurred because the underlying js implementation gets failed to initialize the global ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I really hoped someone would replace this 💩 code really fast 😅
@paviro It will hunt you for the rest of you life. 😉