Replace unneeded use of regex with a simple if
This commit is contained in:
parent
699ae365df
commit
f9251eef68
1 changed files with 4 additions and 1 deletions
|
|
@ -564,7 +564,10 @@ window.initSearch = function(rawSearchIndex) {
|
|||
try {
|
||||
parseInput(query, parserState);
|
||||
if (parserState.typeFilter !== null) {
|
||||
var typeFilter = parserState.typeFilter.replace(/^const$/, "constant");
|
||||
var typeFilter = parserState.typeFilter;
|
||||
if (typeFilter === "const") {
|
||||
typeFilter = "constant";
|
||||
}
|
||||
query.typeFilter = itemTypeFromName(typeFilter);
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue