JS error in the console leading domain mapping page to 504.

I'm trying to set domain mapping on this subsite but it won't save with JS error in the console and lead to 504. Please check and help.