mirror of
https://github.com/discourse/discourse.git
synced 2026-08-05 02:43:08 -05:00
Use dasherize instead of replace
This commit is contained in:
committed by
Robin Ward
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"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user