Skip to content

Commit cca0b80

Browse files
authored
fix(cli): Avoid duplicate entries in packageClassList (#7470)
1 parent 1e7aeb5 commit cca0b80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/src/util/iosplugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ export async function findPluginClasses(files: string[]): Promise<string[]> {
4545
const objcPluginRegex = RegExp(/CAP_PLUGIN\(([A-Za-z0-9_-]+)/);
4646

4747
const swiftMatches = swiftPluginRegex.exec(fileData);
48-
if (swiftMatches?.[1] != null) {
48+
if (swiftMatches?.[1] && !classList.includes(swiftMatches[1])) {
4949
classList.push(swiftMatches[1]);
5050
}
5151

5252
const objcMatches = objcPluginRegex.exec(fileData);
53-
if (objcMatches?.[1] != null) {
53+
if (objcMatches?.[1] && !classList.includes(objcMatches[1])) {
5454
classList.push(objcMatches[1]);
5555
}
5656
}

0 commit comments

Comments
 (0)