Use Array.prototype.filter instead of open-coding

Part of #79052, originally suggested in https://github.com/rust-lang/rust/pull/79052#discussion_r523468743

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Michael Howell 2020-12-31 17:51:46 -07:00 committed by GitHub
parent 44e3daf5ee
commit a3958d039d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -667,13 +667,7 @@ function defocusSearchBar() {
results = {}, results_in_args = {}, results_returned = {},
split = valLower.split("::");
var length = split.length;
for (var z = 0; z < length; ++z) {
if (split[z] === "") {
split.splice(z, 1);
z -= 1;
}
}
split = split.filter(function(segment) { return segment !== ""; });
function transformResults(results, isType) {
var out = [];