Skip to content

Commit 6b1667c

Browse files
authored
Merge pull request bhollis#224 from dengarcia/loop-optimization
Small loop optimization
2 parents 18d409f + 0fffa78 commit 6b1667c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/background-chrome.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function detectJSON(event: chrome.webRequest.WebResponseHeadersDetails) {
2323
isJSONContentType(header.value)
2424
) {
2525
addJsonUrl(event.url);
26+
break;
2627
}
2728
}
2829

src/background-firefox.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function detectJSON(event: chrome.webRequest.WebResponseHeadersDetails) {
2727
// We need to change the content type to text/plain to prevent Firefox
2828
// from using its built-in JSON viewer.
2929
header.value = "text/plain; charset=UTF-8";
30+
break;
3031
}
3132
}
3233
}

0 commit comments

Comments
 (0)