Skip to content

Commit e27795c

Browse files
authored
Handle null message (#455)
If the message was not found on a notification, don't try to display anything. - Refs readthedocs/readthedocs.org#11542
1 parent 9c70d80 commit e27795c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

readthedocsext/theme/static/readthedocsext/theme/js/site.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/modules/notifications.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class NotificationElement extends LightDOMElement {
2727
};
2828

2929
render() {
30-
if (this.notification === undefined) {
30+
if (this.notification === undefined || this.notification.message === null) {
3131
return nothing;
3232
}
3333

0 commit comments

Comments
 (0)