Changed to ternary operator in updateSummary.