Browse Source

build(js): Bump lodash (#25246)

Evan Purkhiser 3 years ago
parent
commit
c4dcd6fef7
3 changed files with 14 additions and 8 deletions
  1. 1 1
      package.json
  2. 9 3
      static/app/components/smartSearchBar/index.tsx
  3. 4 4
      yarn.lock

+ 1 - 1
package.json

@@ -36,7 +36,7 @@
     "@types/jest": "^26.0.22",
     "@types/jquery": "^2.0.53",
     "@types/js-cookie": "^2.2.2",
-    "@types/lodash": "^4.14.134",
+    "@types/lodash": "^4.14.168",
     "@types/marked": "^0.7.2",
     "@types/moment-timezone": "^0.5.12",
     "@types/papaparse": "^4.5.11",

+ 9 - 3
static/app/components/smartSearchBar/index.tsx

@@ -813,7 +813,8 @@ class SmartSearchBar extends React.Component<Props, State> {
 
         const tagKeys = this.getTagKeys('');
         const recentSearches = await this.getRecentSearches();
-        this.updateAutoCompleteState(tagKeys, recentSearches, '', 'tag-key');
+
+        this.updateAutoCompleteState(tagKeys, recentSearches ?? [], '', 'tag-key');
         return;
       }
 
@@ -841,7 +842,7 @@ class SmartSearchBar extends React.Component<Props, State> {
       this.setState({searchTerm: matchValue});
       this.updateAutoCompleteState(
         autoCompleteItems,
-        recentSearches,
+        recentSearches ?? [],
         matchValue,
         'tag-key'
       );
@@ -901,7 +902,12 @@ class SmartSearchBar extends React.Component<Props, State> {
       this.getRecentSearches(),
     ]);
 
-    this.updateAutoCompleteState(tagValues, recentSearches, tag.key, 'tag-value');
+    this.updateAutoCompleteState(
+      tagValues ?? [],
+      recentSearches ?? [],
+      tag.key,
+      'tag-value'
+    );
     return;
   };
 

+ 4 - 4
yarn.lock

@@ -3027,10 +3027,10 @@
   resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
   integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
 
-"@types/lodash@^4.14.134":
-  version "4.14.149"
-  resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440"
-  integrity sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ==
+"@types/lodash@^4.14.168":
+  version "4.14.168"
+  resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008"
+  integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==
 
 "@types/markdown-to-jsx@^6.11.3":
   version "6.11.3"