Skip to content

Phabricator: fix exception in getCodeElementFromTarget()

Warren Gifford requested to merge phabricator-null-linenumbercell into master

Created by: lguychard

In https://github.com/sourcegraph/sourcegraph/pull/5631/files#diff-8d890e341f1eb66bbf6768bc17c7acb2, getLineNumberCellFromCodeElement() was changed to always return HTMLElement (never null), and to throw when a line number cell could not be found.

However, this broke getCodeElementFromTarget() when hovering elements that legitimately do not have a line number cell (for instance 'empty' lines in the base part of a split diff that has added lines).

image

Merge request reports

Loading