If an error has been made in a block of text you are editing, you can cancel it immediately using the keyboard shortcut CTRL + Z, or by clicking on the arrow in the block toolbar:
If the modification has been saved (manually, or automatically when the block is closed), the previous version of the block should be restored via the modification history.
To find out more about the modification history, see the following article: How do I track changes in the word processor?