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