Refactor code
This commit is contained in:
@ -107,7 +107,6 @@ export async function getPortfolioArtworksPage(args: {
|
||||
.filter((y): y is number => typeof y === "number")
|
||||
.sort((a, b) => b - a);
|
||||
|
||||
// Segment logic (sortKey != null first, then null)
|
||||
const inNullSegment = cursor?.afterSortKey === null;
|
||||
|
||||
const select = {
|
||||
@ -180,7 +179,6 @@ export async function getPortfolioArtworksPage(args: {
|
||||
if (!last) {
|
||||
return { items, nextCursor: null, total, years, albums };
|
||||
}
|
||||
// last.sortKey can be null only in null-segment, which we are not in here.
|
||||
if (last.sortKey == null) {
|
||||
return { items, nextCursor: null, total, years, albums };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user