This is already fixed in
https://github.com/discourse/discourse/commit/73546365028a21bab90d7fd3bf5975a577bb5e7d