From ceb7d486fbc8d65bdfa5d72834ff8ad051fa8a0d Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Fri, 24 Nov 2023 10:54:39 +0800 Subject: [PATCH] fix code search bug --- frontend/src/components/search/search.js | 2 +- frontend/src/components/search/wiki-search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/search/search.js b/frontend/src/components/search/search.js index 3a2c775533a..fe8c3d7f2cc 100644 --- a/frontend/src/components/search/search.js +++ b/frontend/src/components/search/search.js @@ -192,7 +192,7 @@ class Search extends Component { onSearch = () => { const { value } = this.state; const { repoID } = this.props; - if (this.inputValue === '' || this.getValueLength(this.inputValue) < 3) { + if (this.inputValue === '' || getValueLength(this.inputValue) < 3) { this.setState({ highlightIndex: 0, resultItems: [], diff --git a/frontend/src/components/search/wiki-search.js b/frontend/src/components/search/wiki-search.js index 92befc88e57..936ac640819 100644 --- a/frontend/src/components/search/wiki-search.js +++ b/frontend/src/components/search/wiki-search.js @@ -62,7 +62,7 @@ class Search extends Component { } this.inputValue = newValue.trim(); - if (this.inputValue === '' || _this.getValueLength(this.inputValue) < 3) { + if (this.inputValue === '' || getValueLength(this.inputValue) < 3) { this.setState({ isResultShow: false, isResultGetted: false