Skip to content

Commit 8fc3608

Browse files
committed
fix(handlerUtil): update code as per GitHub UI changes
1 parent eabc0ab commit 8fc3608

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## **v5.0.1** - 14th Oct, 2020
8+
9+
- Update selector path logic as per GitHub UI changes
10+
711
## **v5.0.0** - 3rd Aug, 2020
812

913
- Support Firefox browser 🎉

src/utils/handlersUtil.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ let handlersUtil = {
5151
);
5252

5353
let actualDataIndex = 0;
54+
let startIndex = 0;
5455

55-
for (var i = 0; i < containerItems.length; i++) {
56-
const commitElem = containerItems[i].querySelector('.commit-message');
56+
if (window.location.href && window.location.href.indexOf('tree/' + commonUtil.getBranch()) > -1) {
57+
startIndex = 1;
58+
}
59+
60+
for (var i = startIndex; i < containerItems.length; i++) {
61+
const commitElem = containerItems[i].querySelector('div:nth-of-type(3)');
5762

5863
if (commitElem) {
5964
containerItems[i].querySelector('div:nth-of-type(2)').classList.remove('col-md-2', 'mr-3');

0 commit comments

Comments
 (0)