about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2021-03-13 09:34:37 -0700
committerMichael Howell <michael@notriddle.com>2021-03-13 09:34:52 -0700
commitca04ce364552b58ce8cb5dabcbec6ca88cb1b1e0 (patch)
tree71d661bdbdb74f67401ef3cfde5cb2572ced33e3
parentb76a3d3592f1b7c495501a892f537635a7a313c3 (diff)
downloadrust-ca04ce364552b58ce8cb5dabcbec6ca88cb1b1e0.tar.gz
rust-ca04ce364552b58ce8cb5dabcbec6ca88cb1b1e0.zip
Use null instead of undefined here
-rw-r--r--src/librustdoc/html/static/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 6ec97f2e924..38f244ba89f 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -859,7 +859,7 @@ function defocusSearchBar() {
                         for (x = 0; x < vlength; ++x) {
                             var lev = MAX_LEV_DISTANCE + 1;
                             var firstGeneric = getObjectNameFromId(val.generics[x]);
-                            var match = undefined;
+                            var match = null;
                             if (elems[firstGeneric]) {
                                 match = firstGeneric;
                                 lev = 0;
@@ -872,7 +872,7 @@ function defocusSearchBar() {
                                     }
                                 }
                             }
-                            if (match !== undefined) {
+                            if (match !== null) {
                                 elems[match] -= 1;
                                 if (elems[match] == 0) {
                                     delete elems[match];