|
@@ -449,7 +449,8 @@ const comparing = async () => {
|
|
|
distanceChangedCallback: useDocument.setDistance,
|
|
|
notUpdatePwd: true
|
|
|
}
|
|
|
- await loadDocument(res.url, options)
|
|
|
+ const res = await loadDocument(res.url, options)
|
|
|
+ if (!res) return
|
|
|
loading.value = false
|
|
|
|
|
|
// useViewer.toggleElement('leftPanel')
|
|
@@ -557,7 +558,8 @@ async function uploadPdf (pdf, filename = null, docNum) {
|
|
|
options.pwd = pwd
|
|
|
}
|
|
|
try {
|
|
|
- await loadDocument(pdf, options, docNum)
|
|
|
+ const res = await loadDocument(pdf, options, docNum)
|
|
|
+ if (!res) return
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
useViewer.setDownloadError('Loaded')
|