[deploy] Return boolean value instead of undefined for listings open modal (#7854)
* Return a boolean value not undefined * Fix typo
This commit is contained in:
parent
d1e39a7dba
commit
22cdbcbd38
3 changed files with 7 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ const firstListing = {
|
|||
},
|
||||
};
|
||||
|
||||
const secondtListing = {
|
||||
const secondListing = {
|
||||
id: 21,
|
||||
category: 'misc',
|
||||
location: 'West Refugio',
|
||||
|
|
@ -56,7 +56,7 @@ const thirdListing = {
|
|||
},
|
||||
};
|
||||
|
||||
const listings = [firstListing, secondtListing, thirdListing];
|
||||
const listings = [firstListing, secondListing, thirdListing];
|
||||
|
||||
const getProps = () => ({
|
||||
listings,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ describe('updateListings', () => {
|
|||
},
|
||||
};
|
||||
|
||||
const secondtListing = {
|
||||
const secondListing = {
|
||||
id: 21,
|
||||
category: 'misc',
|
||||
location: 'West Refugio',
|
||||
|
|
@ -57,10 +57,10 @@ describe('updateListings', () => {
|
|||
},
|
||||
};
|
||||
|
||||
const classifiedListings = [firstListing, secondtListing, thirdListing];
|
||||
const classifiedListings = [firstListing, secondListing, thirdListing];
|
||||
test('Should update the listings', () => {
|
||||
const result = updateListings(classifiedListings);
|
||||
const expectedResult = [firstListing, secondtListing];
|
||||
const expectedResult = [firstListing, secondListing];
|
||||
|
||||
expect(result).toEqual(expectedResult);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -282,7 +282,8 @@ export class Listings extends Component {
|
|||
message,
|
||||
} = this.state;
|
||||
|
||||
const shouldRenderModal = openedListing != null && undefined;
|
||||
const shouldRenderModal =
|
||||
openedListing !== null && openedListing !== undefined;
|
||||
|
||||
if (initialFetch) {
|
||||
this.triggerMasonry();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue