Skip to content

fix(stack-parser): fix source code lines iterations #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hawk.so/javascript",
"type": "commonjs",
"version": "3.2.2",
"version": "3.2.3",
"description": "JavaScript errors tracking for Hawk.so",
"files": [
"dist"
Expand Down
4 changes: 2 additions & 2 deletions src/modules/stackParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class StackParser {
* In some cases column number of the error stack trace frame would be less then 200, but source code is minified
* For this cases we need to check, that all of the lines to collect have length less than 200 too
*/
for (const lineToCheck in lines.slice(lineFrom, lineTo)) {
lines.slice(lineFrom, lineTo).forEach((lineToCheck) => {
if (lineToCheck.length > minifiedSourceCodeThreshold) {
return null;
} else {
Expand All @@ -91,7 +91,7 @@ export default class StackParser {

extractedLineIndex += 1;
}
}
});

return sourceCodeLines;
} catch (e) {
Expand Down
Loading