Fix console error when uploading whole dictionary

This commit is contained in:
Robbie Antenesse 2019-07-10 11:56:06 -06:00 committed by Robbie Antenesse
parent 10d2159262
commit a1ea105f66
1 changed files with 3 additions and 1 deletions

View File

@ -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();