It will be absolutely fine, just don't fill it up with water or any other liquid.
Cannabis has remarkable powers of overcoming adversity, topping being one adverse event.
The hollow stub will dry up and shrivel down to nothing in time, there is no need to do anything, the plant will heal itself.