Skip to content

Commit

Permalink
lint?
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Oct 21, 2024
1 parent b9b8b88 commit 4327edc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/renderer/coremods/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ async function injectApplicationCommandSearchStore(): Promise<void> {
);
if (!commandAndSectionsArray.length) return;
if (
!commandAndSectionsArray.every((commandAndSection) =>
res.some((section) => section.id === commandAndSection.section.id),
!commandAndSectionsArray.every(
(commandAndSection) => res?.some((section) => section.id === commandAndSection.section.id),
)
) {
const sectionsToAdd = commandAndSectionsArray
.map((commandAndSection) => commandAndSection.section)
.filter((section) => res.some((existingSections) => section.id === existingSections.id));
.filter((section) => res?.some((existingSections) => section.id === existingSections.id));
res.push(...sectionsToAdd);
}
return res;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/modules/webpack/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ByPropsOptions, RawModule } from "../../../types";
export const byProps = <P extends PropertyKey = PropertyKey>(
...args: [...P[], ByPropsOptions] | P[]
): ((m: RawModule) => boolean) => {
if (typeof args.at(-1) === "object" && !Array.isArray(args.at(-1)) && args.at(-1) !== null) {
if (typeof args.at(-1) === "object" && !Array.isArray(args.at(-1)) && args.at(-1)) {
const options = args.pop() as ByPropsOptions;
return (m: RawModule) =>
typeof getExportsForProps(m.exports, args as P[], options) !== "undefined";
Expand Down

0 comments on commit 4327edc

Please sign in to comment.