mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +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:
@ -38,7 +38,7 @@ export default Controller.extend({
|
||||
_addIncoming(eventId) {
|
||||
const incomingEventIds = this.incomingEventIds;
|
||||
|
||||
if (incomingEventIds.indexOf(eventId) === -1) {
|
||||
if (!incomingEventIds.includes(eventId)) {
|
||||
incomingEventIds.pushObject(eventId);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user