Now it is fixed by the below commit
https://github.com/discourse/discourse/commit/cfd1549abe20d63f6c384d5d12d4b7e90357ca20