Better like this I think

if (currentPage || numberOfSpecialPages === 1)