Iga Swiatek was made to work hard in her three-set victory over Barbora Krejcikova at the WTA Finals in Riyadh