Merge pull request #39950 from nextcloud/bugfix/uncaught-preview-promise

This commit is contained in:
Julius Härtl 2023-08-22 17:35:45 +02:00 committed by GitHub
commit 2bb48a6dc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -170,7 +170,7 @@ import { CancelablePromise } from 'cancelable-promise'
import { debounce } from 'debounce'
import { emit } from '@nextcloud/event-bus'
import { extname } from 'path'
import { formatFileSize, Permission } from '@nextcloud/files'
import { formatFileSize, FileType, Permission } from '@nextcloud/files'
import { generateUrl } from '@nextcloud/router'
import { showError, showSuccess } from '@nextcloud/dialogs'
import { translate } from '@nextcloud/l10n'
@ -395,6 +395,10 @@ export default Vue.extend({
return this.userConfig.crop_image_previews
},
previewUrl() {
if (this.source.type === FileType.Folder) {
return null
}
try {
const previewUrl = this.source.attributes.previewUrl
|| generateUrl('/core/preview?fileId={fileid}', {

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long