Skip to content

Commit

Permalink
Merge pull request #83 from Alokit-Innovations/mkp/bug-fix
Browse files Browse the repository at this point in the history
changed type strings to integer type in if conditions for `githubHunkHighlight` function
  • Loading branch information
avikalpg authored Nov 18, 2023
2 parents 11fbf4e + 04fa87f commit d9814d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Vibinex Code Review",
"version": "1.0.4",
"version": "1.0.5",
"manifest_version": 3,
"description": "Personalization and context for pull requests on GitHub & Bitbucket",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsRm6EaBdHDBxVjt9o9WKeL9EDdz1X+knDAU5uoZaRsXTmWjslhJN9DhSd7/Ys4aJOSN+s+5/HnIHcKV63P4GYaUM5FhETHEWORHlwIgjcV/1h6wD6bNbvXi06gtiygE+yMrCzzD93/Z+41XrwMElYiW2U5owNpat2Yfq4p9FDX1uBJUKsRIMp6LbRQla4vAzH/HMUtHWmeuUsmPVzcq1b6uB1QmuJqIQ1GrntIHw3UBWUlqRZ5OtxI1DCP3knglvqz26WT5Pc4GBDNlcI9+3F0vhwqwHqrdyjZpIKZ7iaQzcrovOqUKuXs1J3hDtXq8WoJELIqfIisY7rhAvq6b8jQIDAQAB",
Expand Down
4 changes: 2 additions & 2 deletions scripts/highlighting.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const githubHunkHighlight = async (apiResponses) => {
const tableNumber = item.querySelector('td[data-line-number]');
const checkNumber = tableNumber.getAttribute('data-line-number');
for (const foundFile of foundFiles) {
if ((signature == '-' || signature == '+') && checkNumber >= foundFile.line_start && checkNumber <= foundFile.line_end) {
if ((signature == '-' || signature == '+') && parseInt(checkNumber) >= parseInt(foundFile.line_start) && parseInt(checkNumber) <= parseInt(foundFile.line_end)) {
flag = true;
} else {
flag = false;
Expand All @@ -247,7 +247,7 @@ const githubHunkHighlight = async (apiResponses) => {
const tableContent = items.querySelector("td[data-split-side='left']");
if ((tableContent.innerHTML === '') || (tableContent && tableContent.querySelector("span[data-code-marker='-']"))) {
for (const foundFile of foundFiles) {
if (dataLineValue >= foundFile.line_start && dataLineValue <= foundFile.line_end) {
if (parseInt(dataLineValue) >= parseInt(foundFile.line_start) && parseInt(dataLineValue) <= parseInt(foundFile.line_end)) {
items.style.backgroundColor = GH_RELEVANT_BG_COLOR;
}
}
Expand Down

0 comments on commit d9814d1

Please sign in to comment.