mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 08:11:50 +08:00
DEV: Extensively use includes()
(#17541)
Also, the change in insert-hyperlink (from `this.linkUrl.indexOf("http") === -1` to `!this.linkUrl.startsWith("http")`) was intentional fix: we don't want to prevent users from looking up topics with http in their titles.
This commit is contained in:
@ -41,7 +41,7 @@ export default Component.extend({
|
||||
if (["color_definitions"].includes(fieldName)) {
|
||||
return "scss";
|
||||
}
|
||||
return fieldName && fieldName.indexOf("scss") > -1 ? "scss" : "html";
|
||||
return fieldName && fieldName.includes("scss") ? "scss" : "html";
|
||||
},
|
||||
|
||||
@discourseComputed("currentTargetName", "fieldName")
|
||||
|
Reference in New Issue
Block a user