Good point. This should do it:
https://github.com/discourse/discourse/commit/c2c169f5b7d69e6a4ab734b4ff21aa77d1be2a5b