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