From a1ea105f66676202d63318134c3b44372843c4be Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Wed, 10 Jul 2019 11:56:06 -0600 Subject: [PATCH] Fix console error when uploading whole dictionary --- src/js/account/sync.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/account/sync.js b/src/js/account/sync.js index 1272636..ba200c5 100644 --- a/src/js/account/sync.js +++ b/src/js/account/sync.js @@ -80,7 +80,9 @@ export function uploadWholeDictionary(asNew = false) { dictionary, }, remoteId => { window.currentDictionary.externalID = remoteId; - document.getElementById('publicLink').value = document.domain + window.location.pathname + remoteId.toString(); + if (document.getElementById('publicLink')) { + document.getElementById('publicLink').value = getPublicLink(); + } saveDictionary(false); addMessage('Dictionary Uploaded Successfully'); renderChangeDictionaryOptions();