DEV: Fix `no-extra-boolean-cast` lint (#24582)
This commit is contained in:
parent
cbc5694b77
commit
a80e32fe75
|
@ -56,8 +56,7 @@ export default function makeEngine(
|
|||
allowLister.allowListFeature(feature, info);
|
||||
});
|
||||
|
||||
options.sanitizer = options.discourse.sanitizer = !!options.discourse
|
||||
.sanitize
|
||||
options.sanitizer = options.discourse.sanitizer = options.discourse.sanitize
|
||||
? (a) => sanitize(a, allowLister)
|
||||
: (a) => a;
|
||||
}
|
||||
|
|
|
@ -389,7 +389,7 @@ export default Controller.extend({
|
|||
Promise.resolve(categoryTagSearch)
|
||||
.then(async (results) => {
|
||||
const categories = results.filter((c) => Boolean(c.model));
|
||||
const tags = results.filter((c) => !Boolean(c.model));
|
||||
const tags = results.filter((c) => !c.model);
|
||||
const model = (await translateResults({ categories, tags })) || {};
|
||||
this.set("model", model);
|
||||
})
|
||||
|
|
|
@ -206,7 +206,7 @@ export default class StoreService extends Service {
|
|||
createRecord(type, attrs) {
|
||||
attrs = attrs || {};
|
||||
const adapter = this.adapterFor(type);
|
||||
return !!attrs[adapter.primaryKey]
|
||||
return attrs[adapter.primaryKey]
|
||||
? this._hydrate(type, attrs)
|
||||
: this._build(type, attrs);
|
||||
}
|
||||
|
|
|
@ -122,11 +122,11 @@ export function performEmojiEscape(string, opts) {
|
|||
|
||||
const replacementFunction = (m, index) => {
|
||||
if (isReplaceableInlineEmoji(string, index, opts.inlineEmoji)) {
|
||||
if (!!allTranslations[m]) {
|
||||
if (allTranslations[m]) {
|
||||
return opts.emojiShortcuts ? `:${allTranslations[m]}:` : m;
|
||||
} else if (!!replacements[m]) {
|
||||
} else if (replacements[m]) {
|
||||
return `:${replacements[m]}:`;
|
||||
} else if (!!replacements[m[0]]) {
|
||||
} else if (replacements[m[0]]) {
|
||||
return `:${replacements[m[0]]}:`;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ const chatTranscriptRule = {
|
|||
|
||||
let wrapperClasses = ["chat-transcript"];
|
||||
|
||||
if (!!tagInfo.attrs.chained) {
|
||||
if (tagInfo.attrs.chained) {
|
||||
wrapperClasses.push("chat-transcript-chained");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue