Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-07-30 15:00:29 +0400
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-07-30 15:00:29 +0400
commit0ac64ed20560fcdb9b03b358d7321bccf7e60e6d (patch)
treec66b0143f0664428c7677c4105bd5b18bf101ac1 /js
parent57fc21fe59c2b2001397ea085366ffd70037810c (diff)
check the FileActions has a current file set
Diffstat (limited to 'js')
-rw-r--r--js/editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/editor.js b/js/editor.js
index 84372e4..0d99e69 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -189,7 +189,7 @@ function giveEditorFocus() {
// Loads the file editor. Accepts two parameters, dir and filename.
function showFileEditor(dir, filename) {
// Check if unsupported file format
- if(FileActions.getCurrentMimeType() === 'text/rtf') {
+ if(FileActions.currentFile && FileActions.getCurrentMimeType() === 'text/rtf') {
// Download the file instead.
window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
} else {