New Document in search bar is case sensitive (#3504)

* makes `get_creatables` change keywords to lowercase before comparison

* fixed codacy issues

* Update search_utils.js
This commit is contained in:
tundebabzy 2017-06-19 13:30:28 +01:00 committed by Rushabh Mehta
parent a9cf952505
commit 323e70db33

View file

@ -103,7 +103,8 @@ frappe.search.utils = {
get_creatables: function(keywords) {
var me = this;
var out = [];
if(keywords.split(" ")[0]==="new") {
var firstKeyword = keywords.split(" ")[0];
if(firstKeyword.toLowerCase() === __("new")) {
frappe.boot.user.can_create.forEach(function (item) {
var level = me.fuzzy_search(keywords.substr(4), item);
if(level) {