Closed gvgvgvijayan closed 4 years ago
Replace in-array condition value to published instead of popularityIndex when sorting by published time.
https://github.com/analogwp/analogwp-templates/blob/develop/client/App.js#L347
Snippet where issue present:
if ( 'latest' === value ) { const sorted = sortData.sort( ( a, b ) => { if ( 'popularityIndex' in a ) { if ( parseInt( getTime( a.published ) ) < parseInt( getTime( b.published ) ) ) { return 1; } if ( parseInt( getTime( a.published ) ) > parseInt( getTime( b.published ) ) ) { return -1; } } return 0; } ); this.setState( { [ library ]: sorted } ); }
Replace in-array condition value to published instead of popularityIndex when sorting by published time.
https://github.com/analogwp/analogwp-templates/blob/develop/client/App.js#L347
Snippet where issue present: