Narrated Ibn 'Umar:
That the Messenger of Allah (ﷺ) said: "Whoever swears about an oath and says: 'If Allah wills (Insha Allah), then there is no breaking of the oath against him."