Here’s the fix
https://github.com/discourse/discourse/commit/321d1bd0a9e6f203aee588577ceeccb4fa5bbe8b