Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit f98a9a8

Browse files
attfarhansqs
authored andcommitted
fix: code intel on diffs with newly added files
1 parent 7bfeabc commit f98a9a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libs/github/dom_functions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ export const getDiffLineRanges: CodeView['getLineRanges'] = (codeView, part) =>
202202
if (isCode) {
203203
const line = row.querySelector<HTMLElement>(
204204
`td${isDomSplitDiff() ? `:nth-of-type(${part === 'base' ? 2 : 4})` : '.blob-code'}`
205-
)!
205+
)
206+
206207
if (
208+
!line ||
207209
line.classList.contains('empty-cell') ||
208210
line.classList.contains(part === 'base' ? 'blob-code-addition' : 'blob-code-deletion')
209211
) {

0 commit comments

Comments
 (0)