Is this true?

If you have your phone plugged in charging and the power goes out, it can fry your phone or erase everything?