The inverter does not produce or store electric energy. If there is no direct supply from solar panels and batteries are dead too, in that case, an inverter would have nothing to convert, and it would not supply power further.