[stable16] Properly load permissions in showActions (#16282)

[stable16] Properly load permissions in showActions
This commit is contained in:
John Molakvoæ 2019-07-08 09:38:45 +02:00 committed by GitHub
commit 3ffd5b0a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1805,7 +1805,7 @@
* @return permission value as integer
*/
getDirectoryPermissions: function() {
return parseInt(this.$el.find('#permissions').val(), 10);
return this && this.dirInfo && this.dirInfo.permissions ? this.dirInfo.permissions : parseInt(this.$el.find('#permissions').val(), 10);
},
/**
* Changes the current directory and reload the file list.