Skip to content

Commit

Permalink
Merge pull request #13940 from ngoctr/fix-analytics-media-source-for-…
Browse files Browse the repository at this point in the history
…stockphotos

Wrong analytics image source for Stock Photo in Gutenberg Editor
  • Loading branch information
ScoutHarris authored Apr 20, 2020
2 parents e33b243 + 7737b01 commit 3e51da2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension GutenbergStockPhotos: StockPhotosPickerDelegate {
}

let mediaInfo = assets.compactMap({ (asset) -> MediaInfo? in
guard let media = self.mediaInserter.insert(exportableAsset: asset, source: .giphy) else {
guard let media = self.mediaInserter.insert(exportableAsset: asset, source: .stockPhotos) else {
return nil
}
let mediaUploadID = media.gutenbergUploadID
Expand All @@ -75,7 +75,7 @@ extension GutenbergStockPhotos: StockPhotosPickerDelegate {
/// - Parameter assets: Stock Media objects to append.
func appendOnNewBlocks(assets: ArraySlice<StockPhotosMedia>) {
assets.forEach {
if let media = self.mediaInserter.insert(exportableAsset: $0, source: .giphy) {
if let media = self.mediaInserter.insert(exportableAsset: $0, source: .stockPhotos) {
self.gutenberg.appendMedia(id: media.gutenbergUploadID, url: $0.URL, type: .image)
}
}
Expand Down

0 comments on commit 3e51da2

Please sign in to comment.