Originally Posted by
BikeWise1
Learning to effectively use the front brake can help prevent this sort of thing, but sometimes, it is hard to avoid it.
+1
Sometimes when I panic I grab both brakes by accident, but if you're not yet aware in such a situation (on dry pavement) you should only be jamming the front brake just before the point you tip over. This takes practice but it's important safety-wise because the front brake alone will stop you twice as fast as the rear brake alone.