fix: Don't use data.reduce when data is empty.