Skip to content

Commit

Permalink
Improve check perf
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Dec 18, 2024
1 parent 844da52 commit 9e99780
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/common/utils/frameUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ export function getCallingExtension(): string {
const frames = getFrameData();

for (const frame of frames) {
for (const ext of otherExts) {
const filename = frame.filePath;
if (filename) {
const parts = filename.split(/\\\//);
if (parts.includes(ext)) {
return ext;
}
const filename = frame.filePath;
if (filename) {
const ext = otherExts.find((ext) => filename.includes(ext));
if (ext) {
return ext;
}
}
}
Expand Down

0 comments on commit 9e99780

Please sign in to comment.