Thank you for reporting that bug
I fixed it with that PR:
https://github.com/discourse/discourse/pull/12565