diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index ba29b9096f..407740b111 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -675,7 +675,7 @@ this.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory(); - if (OCA.Files.App.getActiveView() !== 'files') { + if (OCA.Files.App && OCA.Files.App.getActiveView() !== 'files') { OCA.Files.App.setActiveView('files'); OCA.Files.App.fileList.changeDirectory(OC.joinPaths(dir, filename), true, true); } else {