Commit 971a2879 authored by samdbeckham's avatar samdbeckham

Adds a catch for non-dismissible alerts

parent c0fed047
......@@ -12,6 +12,9 @@ export default function initAlertHandler() {
const elements = document.querySelectorAll(selector);
elements.forEach(element => {
const button = element.querySelector(DISMISS_LABEL) || element.querySelector(DISMISS_CLASS);
if (!button) {
return;
}
button.addEventListener('click', () => element.remove());
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment