Use dasherize instead of replace

This commit is contained in:
Daniel Waterworth 2019-06-12 08:47:56 +01:00 committed by Robin Ward
parent d025e188e8
commit 37b8f5d989
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ createWidget("large-notification-item", {
this.site.notificationLookup[attrs.notification_type];
const widgetNames = [
`${notificationName.replace(/_/g, '-')}-notification-item`,
`${notificationName.dasherize()}-notification-item`,
"default-notification-item"
];

View File

@ -95,7 +95,7 @@ export default createWidget("user-notifications", {
this.site.notificationLookup[notificationAttrs.notification_type];
const widgetNames = [
`${notificationName.replace(/_/g, '-')}-notification-item`,
`${notificationName.dasherize()}-notification-item`,
"default-notification-item"
];