about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-10-29 13:42:34 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-11-01 13:41:43 +0100
commite8db5adcce3034b7cde6c62f7bcf9ff52970105c (patch)
tree4c6157c9ee748a77da6be16507f9aa8714773006
parentf6a546e14d1e318eb6e38343eb98d20ac788437a (diff)
downloadrust-e8db5adcce3034b7cde6c62f7bcf9ff52970105c.tar.gz
rust-e8db5adcce3034b7cde6c62f7bcf9ff52970105c.zip
fix function not appearing in first tab when appearing in another one. Thanks to @Seeker14491 for this one!
-rw-r--r--src/librustdoc/html/static/main.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 5bef81c9662..0323c083b9b 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -979,7 +979,8 @@
                         }
                     }
                     if (results['others'].length < maxResults &&
-                        ((query.search && obj.name.indexOf(query.search)) || added === false)) {
+                        ((query.search && obj.name.indexOf(query.search) !== -1) ||
+                          added === false)) {
                         results['others'].push(obj);
                     }
                 }