Skip to content

Commit

Permalink
fix: replace lodash/flatten with native Array.flat
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Olsen <stipsan@gmail.com>
  • Loading branch information
stipsan committed Jan 12, 2023
1 parent d10e532 commit 90f8c07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/UnsplashAssetSource.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import PhotoAlbum from 'react-photo-album'
import flatten from 'lodash/flatten'
import { BehaviorSubject, Subscription } from 'rxjs'
import { UnsplashPhoto } from '../types'
import Photo from './Photo'
Expand Down Expand Up @@ -129,7 +128,7 @@ class UnsplashAssetSourceInternal extends React.Component<
}

getPhotos() {
return flatten(this.state.searchResults)
return this.state.searchResults.flat()
}

updateCursor = (photo: UnsplashPhoto) => {
Expand Down

0 comments on commit 90f8c07

Please sign in to comment.