Skip to content

Commit 2bb48a6

Browse files
authored
Merge pull request #39950 from nextcloud/bugfix/uncaught-preview-promise
2 parents 613cd16 + 79c240a commit 2bb48a6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

apps/files/src/components/FileEntry.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ import { CancelablePromise } from 'cancelable-promise'
170170
import { debounce } from 'debounce'
171171
import { emit } from '@nextcloud/event-bus'
172172
import { extname } from 'path'
173-
import { formatFileSize, Permission } from '@nextcloud/files'
173+
import { formatFileSize, FileType, Permission } from '@nextcloud/files'
174174
import { generateUrl } from '@nextcloud/router'
175175
import { showError, showSuccess } from '@nextcloud/dialogs'
176176
import { translate } from '@nextcloud/l10n'
@@ -395,6 +395,10 @@ export default Vue.extend({
395395
return this.userConfig.crop_image_previews
396396
},
397397
previewUrl() {
398+
if (this.source.type === FileType.Folder) {
399+
return null
400+
}
401+
398402
try {
399403
const previewUrl = this.source.attributes.previewUrl
400404
|| generateUrl('/core/preview?fileId={fileid}', {

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)