From 6471ccff7dd145d3725492ccccaecc6035e851f2 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 26 Aug 2020 02:30:44 -0400
Subject: fixed warnings.  fixed url / annoation updating when navigating web
 pages.

---
 src/client/views/collections/CollectionMenu.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/CollectionMenu.tsx')

diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index 2f257d00b..5f40ac59c 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -725,6 +725,8 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu
         if (this.selectedDoc) {
             Doc.GetProto(this.selectedDoc).data = new WebField(value);
             Doc.SetInPlace(this.selectedDoc, "title", value, true);
+            const annots = Doc.GetProto(this.selectedDoc)["data-annotations-" + this.urlHash(value)];
+            Doc.GetProto(this.selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]);
         }
     }
 
@@ -751,9 +753,7 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu
                         }
                         future && (future.length = 0);
                     }
-                    Doc.GetProto(selectedDoc).data = new WebField(URLy);
-                    const annots = Doc.GetProto(selectedDoc)["data-annotations-" + this.urlHash(url)];
-                    Doc.GetProto(selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]);
+                    this._url = url;
                 }
             }
         } catch (e) {
-- 
cgit v1.2.3-70-g09d2

