This is pretty basic, don't borrow money you can't afford to loose.
This case is really only another example of "read and understand the terms before signing."
If you have 90 days to pay the loan off when you leave the company for any reasons then you must have this scenario covered.