Foxes will not attack a dog or a cat, they are aware that such animals wil fight back, and foxes like the easy life.
If your dog barks, the fox will leg it, if not, the fox will probably ignore it.
Chances are your dog will advise the fox that it is on your dog's patch, and the fox will go.
Foxes will only attack if their den and cubs are under threat, otherwise they like to lead potential attackers well away, then lose them and return home.
So unless your dog is very small and very weak, and the fox is very very hungy - all extremely unlikely to coincide - you have nothing to worry about.