Check if OCA.Files.App is available before calling

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-04-08 11:13:08 +02:00 committed by Morris Jobke
parent 89cab32243
commit 70c4335383
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 1 additions and 1 deletions

View File

@ -675,7 +675,7 @@
this.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { this.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) {
var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory(); 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.setActiveView('files');
OCA.Files.App.fileList.changeDirectory(OC.joinPaths(dir, filename), true, true); OCA.Files.App.fileList.changeDirectory(OC.joinPaths(dir, filename), true, true);
} else { } else {