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