diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-07-30 15:00:29 +0400 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-07-30 15:00:29 +0400 |
commit | 0ac64ed20560fcdb9b03b358d7321bccf7e60e6d (patch) | |
tree | c66b0143f0664428c7677c4105bd5b18bf101ac1 /js | |
parent | 57fc21fe59c2b2001397ea085366ffd70037810c (diff) |
check the FileActions has a current file set
Diffstat (limited to 'js')
-rw-r--r-- | js/editor.js | 2 |
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 { |