Commit c5868637 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Small correction to xtypes search.

Moved test for xtype-begins-with after name-full-match.
The same way they are ordered in results.
parent 318b6080
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -136,12 +136,12 @@ Ext.define('Docs.controller.Search', {
            if (r.xtypes && Ext.Array.some(r.xtypes, function(x) {return reFull.test(x);})) {
                results[xFull].push(r);
            }
            else if (r.xtypes && Ext.Array.some(r.xtypes, function(x) {return reBeg.test(x);})) {
                results[xBeg].push(r);
            }
            else if (reFull.test(name)) {
                results[r.type === "cls" ? clsFull : mFull].push(r);
            }
            else if (r.xtypes && Ext.Array.some(r.xtypes, function(x) {return reBeg.test(x);})) {
                results[xBeg].push(r);
            }
            else if (reBeg.test(name)) {
                results[r.type === "cls" ? clsBeg : mBeg].push(r);
            }