Wemos D1 Keep rebooting when losing connection to WiFi

I see my device keep on rebooting when it loses connection to the wifi, it there a way I can prevent that from happening?