Procházet zdrojové kódy

remove unused undefined check

Saul Shanabrook před 5 roky
rodič
revize
bf2123f913
1 změnil soubory, kde provedl 2 přidání a 10 odebrání
  1. 2 10
      packages/documentsearch/src/searchinstance.ts

+ 2 - 10
packages/documentsearch/src/searchinstance.ts

@@ -116,22 +116,14 @@ export class SearchInstance implements IDisposable {
   }
 
   private async _replaceCurrent(newText: string) {
-    if (
-      this._activeProvider &&
-      this._displayState.query &&
-      newText !== undefined
-    ) {
+    if (this._activeProvider && this._displayState.query) {
       await this._activeProvider.replaceCurrentMatch(newText);
       this.updateIndices();
     }
   }
 
   private async _replaceAll(newText: string) {
-    if (
-      this._activeProvider &&
-      this._displayState.query &&
-      newText !== undefined
-    ) {
+    if (this._activeProvider && this._displayState.query) {
       await this._activeProvider.replaceAllMatches(newText);
       this.updateIndices();
     }