Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Prevent mutation of array
Browse files Browse the repository at this point in the history
  • Loading branch information
micahalcorn committed Aug 27, 2018
1 parent c3729ae commit 787b9f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Conversation extends Component {
async loadListing() {
const { messages } = this.props
// find the most recent listing context or set empty value
const { listingAddress } = messages.reverse().find(m => m.listingAddress) || {}
const { listingAddress } = [...messages].reverse().find(m => m.listingAddress) || {}
// get the listing
const listing = listingAddress ? (await origin.listings.get(listingAddress)) : {}
// if listing does not match state, store and check for a purchase
Expand Down

0 comments on commit 787b9f5

Please sign in to comment.