FIX: Notification menu broken on older browsers (#14019)

replaceAll is not available in all versions of Chrome/Firefox/Edge
that we support, so we need to use replace instead
This commit is contained in:
Martin Brennan 2021-08-12 09:54:15 +10:00 committed by GitHub
parent 20a6bad87e
commit 814aa64a5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export const DefaultNotificationItem = createWidget(
const lookup = this.site.get("notificationLookup"); const lookup = this.site.get("notificationLookup");
const notificationName = lookup[notificationType]; const notificationName = lookup[notificationType];
if (notificationName) { if (notificationName) {
classNames.push(notificationName.replaceAll("_", "-")); classNames.push(notificationName.replace(/_/g, "-"));
} }
return classNames; return classNames;
}, },