Use dasherize instead of replace
This commit is contained in:
parent
d025e188e8
commit
37b8f5d989
|
@ -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"
|
||||
];
|
||||
|
||||
|
|
|
@ -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"
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue