Handle cursor positions that don't yield addresses

The gr-diff-cursor#getAddress method returns null when it has no
position or no address corresponds to it's position. However, the
gr-diff-view#_onLineSelected method did not account for this case and
attempted to use null addresses to construct URLs when moving the cursor
to a "File" line of a diff.

With this change, the diff view neither uses line number nor the diff
side when constructing URLs if the cursor does not yield an address.

Change-Id: I628658295bca1f49e0c2d3484e2e0d01e71bcd91
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
index 30f1d58..3bb373f 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -734,10 +734,11 @@
       this.$.cursor.moveToLineNumber(detail.number, detail.side);
       if (!this._change) { return; }
       const cursorAddress = this.$.cursor.getAddress();
+      const number = cursorAddress ? cursorAddress.number : undefined;
+      const leftSide = cursorAddress ? cursorAddress.leftSide : undefined;
       const url = Gerrit.Nav.getUrlForDiffById(this._changeNum,
           this._change.project, this._path, this._patchRange.patchNum,
-          this._patchRange.basePatchNum, cursorAddress.number,
-          cursorAddress.leftSide);
+          this._patchRange.basePatchNum, number, leftSide);
       history.replaceState(null, '', url);
     },