Fix user permission checks
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index baee68e..3c14cb4 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -217,7 +217,7 @@
let unscrub_option = frappe.model.unscrub(option);
let user_permission = frappe.defaults.get_user_permissions();
if(user_permission && user_permission[unscrub_option]) {
- return user_permission[unscrub_option]["docs"];
+ return user_permission[unscrub_option].map(perm => perm.doc);
} else {
return $.map(locals[`:${unscrub_option}`], function(c) { return c.name; }).sort();
}