@@ -1852,6 +1852,9 @@ function defocusSearchBar() {
1852
1852
var crateSize = 0 ;
1853
1853
1854
1854
searchWords . push ( crate ) ;
1855
+ var nameWithoutUnderscores = crate . indexOf ( "_" ) === - 1
1856
+ ? crate
1857
+ : crate . replace ( / _ / g, "" ) ;
1855
1858
// This object should have exactly the same set of fields as the "row"
1856
1859
// object defined below. Your JavaScript runtime will thank you.
1857
1860
// https://mathiasbynens.be/notes/shapes-ics
@@ -1864,7 +1867,7 @@ function defocusSearchBar() {
1864
1867
parent : undefined ,
1865
1868
type : null ,
1866
1869
id : "" ,
1867
- nameWithoutUnderscores : crate . replace ( / _ / g , "" ) ,
1870
+ nameWithoutUnderscores : nameWithoutUnderscores ,
1868
1871
} ;
1869
1872
crateRow . id = generateId ( crateRow ) ;
1870
1873
searchIndex . push ( crateRow ) ;
@@ -1907,6 +1910,9 @@ function defocusSearchBar() {
1907
1910
for ( i = 0 ; i < len ; ++ i ) {
1908
1911
// This object should have exactly the same set of fields as the "crateRow"
1909
1912
// object defined above.
1913
+ var nameWithoutUnderscores = itemNames [ i ] . indexOf ( "_" ) === - 1
1914
+ ? itemNames [ i ]
1915
+ : itemNames [ i ] . replace ( / _ / g, "" ) ;
1910
1916
var row = {
1911
1917
crate : crate ,
1912
1918
ty : itemTypes [ i ] ,
@@ -1916,7 +1922,7 @@ function defocusSearchBar() {
1916
1922
parent : itemParentIdxs [ i ] > 0 ? paths [ itemParentIdxs [ i ] - 1 ] : undefined ,
1917
1923
type : itemFunctionSearchTypes [ i ] ,
1918
1924
id : "" ,
1919
- nameWithoutUnderscores : itemNames [ i ] . replace ( / _ / g , "" ) ,
1925
+ nameWithoutUnderscores : nameWithoutUnderscores ,
1920
1926
} ;
1921
1927
row . id = generateId ( row ) ;
1922
1928
searchIndex . push ( row ) ;
0 commit comments