mirror of
https://github.com/nextcloud/server.git
synced 2026-02-16 17:30:55 -05:00
Merge pull request #39950 from nextcloud/bugfix/uncaught-preview-promise
This commit is contained in:
commit
2bb48a6dc7
3 changed files with 8 additions and 4 deletions
|
|
@ -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
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue