Ok, here’s the fix
https://github.com/discourse/discourse/commit/9a999bfe84b34ce64fa805db10be0f8df4983857