indexof
This commit is contained in:
parent
f16e19d2b2
commit
88b2f89877
5 changed files with 8 additions and 8 deletions
|
|
@ -309,7 +309,7 @@ const conversation = {
|
|||
(k) =>
|
||||
this.getReplies(cur.id)
|
||||
.map((v) => v.id)
|
||||
.indexOf(k.id) === -1,
|
||||
.includes(k.id),
|
||||
),
|
||||
this.conversation,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ export const mutations = {
|
|||
state.currentUser.blockIds = blockIds
|
||||
},
|
||||
addBlockId(state, blockId) {
|
||||
if (state.currentUser.blockIds.indexOf(blockId) === -1) {
|
||||
if (state.currentUser.blockIds.includes(blockId)) {
|
||||
state.currentUser.blockIds.push(blockId)
|
||||
}
|
||||
},
|
||||
|
|
@ -283,7 +283,7 @@ export const mutations = {
|
|||
state.currentUser.muteIdsMaxId = muteIdsMaxId
|
||||
},
|
||||
addMuteId(state, muteId) {
|
||||
if (state.currentUser.muteIds.indexOf(muteId) === -1) {
|
||||
if (state.currentUser.muteIds.includes(muteId)) {
|
||||
state.currentUser.muteIds.push(muteId)
|
||||
}
|
||||
},
|
||||
|
|
@ -291,7 +291,7 @@ export const mutations = {
|
|||
state.currentUser.domainMutes = domainMutes
|
||||
},
|
||||
addDomainMute(state, domain) {
|
||||
if (state.currentUser.domainMutes.indexOf(domain) === -1) {
|
||||
if (state.currentUser.domainMutes.includes(domain)) {
|
||||
state.currentUser.domainMutes.push(domain)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export const fileTypeExt = (url) => {
|
|||
}
|
||||
|
||||
export const fileMatchesSomeType = (types, file) =>
|
||||
types.some((type) => fileType(file.mimetype) === type)
|
||||
types.includes(fileType(file.mimetype))
|
||||
|
||||
const fileTypeService = {
|
||||
fileType,
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ export const getCssRules = (rules, debug) =>
|
|||
header,
|
||||
directives,
|
||||
rule.component === 'Text' &&
|
||||
rule.state.indexOf('faint') < 0 &&
|
||||
!rule.state.includes('faint') &&
|
||||
rule.directives.textNoCssColor !== 'yes'
|
||||
? ' color: var(--text);'
|
||||
: '',
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ const server = require('../../build/dev-server.js')
|
|||
// For more information on Nightwatch's config file, see
|
||||
// http://nightwatchjs.org/guide#settings-file
|
||||
let opts = process.argv.slice(2)
|
||||
if (opts.indexOf('--config') === -1) {
|
||||
if (!opts.includes('--config')) {
|
||||
opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js'])
|
||||
}
|
||||
if (opts.indexOf('--env') === -1) {
|
||||
if (!opts.includes('--env')) {
|
||||
opts = opts.concat(['--env', 'chrome'])
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue