I have seen links contain undefined
in very rare circumstances when browsing around forums. There must be some sorts of "race conditions" when some actions are performed in a certain order or just very quickly.
I have managed to get undefined
in the URL when making multiple searches in quick succession but I have not been able to find a way to reliably reproduce, so I'm not able to properly investigate what causes it.
If it's really about doing something very fast, it wouldn't be very surprising that humans have a hard time reproducing, but it's quite possible that Google bot is so "fast" it clicks on links as soon as they render and they still contain undefined
at that time.