Properly load permissions in showActions (#15992)

Properly load permissions in showActions
This commit is contained in:
John Molakvoæ 2019-07-07 20:20:09 +02:00 committed by GitHub
commit 2f86fd604b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1803,7 +1803,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.