소스 검색

A small fix which I forgot to commit

Irina Smokvarska 3 년 전
부모
커밋
ed3d243022
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      LiveLikeGiphyChallenge/LiveLikeGiphyChallenge/MainScreen/MainViewModel.swift

+ 1 - 1
LiveLikeGiphyChallenge/LiveLikeGiphyChallenge/MainScreen/MainViewModel.swift

@@ -26,7 +26,7 @@ final class MainViewModel: ObservableObject {
       if stringValue.isEmpty {
          self?.fetchTrendingData(chunk: self?.chunkCount ?? 0)
       } else {
-        self?.fetchSearchDataBy(string: self!.searchText , chunk: self?.chunkCount ?? 0)
+        self?.fetchSearchDataBy(string: stringValue , chunk: self?.chunkCount ?? 0)
       }
     }
     .store(in: &subscriptions)