Fix type for patchNumStr

In #1244 in GrChangeView, we assign value.patchNum to patchRange.
This value can be undefined specifiying the latest patchset to be
taken.

Setting undefined triggers the patchNumChanged observer which uses
the undefined value to assign undefined to _selectedRevision as well.

Once _selectedRevision is set to undefined all further calls to the
observer function return early since there is a check for
_selectedRevision to not be undefined and the correct value is never
assigned sending the incorrect revisions to plugins listening to the
value _selectedRevision.

Google-bug-id: b/204542631
Change-Id: I67fe7154f458aef46e124e16bfb4891e09ec4e47
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
index e7bf7da..8d64bc0 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
@@ -2480,8 +2480,8 @@
   }
 
   @observe('_patchRange.patchNum')
-  _patchNumChanged(patchNumStr: PatchSetNum) {
-    if (!this._selectedRevision) {
+  _patchNumChanged(patchNumStr?: PatchSetNum) {
+    if (!this._selectedRevision || !patchNumStr) {
       return;
     }
     assertIsDefined(this._change, '_change');