diff options
author | Joas Schilling <coding@schilljs.com> | 2021-02-25 08:25:58 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-02-25 08:25:58 +0100 |
commit | 57e7d2f5fc180d52bf925a1c473ae5624e33b36d (patch) | |
tree | 0ffd9044c431b8fda476dd2682648d782a8cfc04 /src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | |
parent | f64d87549cc9fe1a567a02921176a42392ed33b5 (diff) |
Check viewer handlers before using them
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue')
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue index 082b98fdb..643a393f9 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue @@ -283,7 +283,7 @@ export default { const availableHandlers = OCA.Viewer.availableHandlers for (let i = 0; i < availableHandlers.length; i++) { - if (availableHandlers[i].mimes.includes(this.mimetype)) { + if (availableHandlers[i]?.mimes?.includes(this.mimetype)) { return true } } |