Updated sortData method to prevent the sortInfo property from being completely reassigned.