X-Forwarded-For in the request-ip package potential bug

I was reading the request-ip code. (Link here) and I noticed that when dealing with the X-Forwarded-For part it is treated as if it will only be a string always. when in reality it’s very possible that it can be an array of IPs, and when it wants to get client IP from X-Forwarded-For, it assumes that it is just a string of IPs concatenated with a ‘,’ character

I expected it to join the IPs with a ‘,’ character if it was an array, but that’s not the case. what am I doing wrong?