Skip to content

Commit

Permalink
fix(cli): Avoid duplicate entries in packageClassList (#7470)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jun 10, 2024
1 parent 1e7aeb5 commit cca0b80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/util/iosplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export async function findPluginClasses(files: string[]): Promise<string[]> {
const objcPluginRegex = RegExp(/CAP_PLUGIN\(([A-Za-z0-9_-]+)/);

const swiftMatches = swiftPluginRegex.exec(fileData);
if (swiftMatches?.[1] != null) {
if (swiftMatches?.[1] && !classList.includes(swiftMatches[1])) {
classList.push(swiftMatches[1]);
}

const objcMatches = objcPluginRegex.exec(fileData);
if (objcMatches?.[1] != null) {
if (objcMatches?.[1] && !classList.includes(objcMatches[1])) {
classList.push(objcMatches[1]);
}
}
Expand Down

0 comments on commit cca0b80

Please sign in to comment.