St Helens went joint top of Super League alongside Leeds Rhinos as they hung on for an 18-12 win at home to Wakefield Trinity on Saturday.