I found it. There was some analytics code like this:
function sendClickyEvent(href, title, type) {
if (clicky && clicky.log) {
clicky.log(href, title, type);
}
}
It should be window.clicky to avoid an error, but I just wrapped all the analytics code in try/catch blocks to be sure.
It was crashing when posting for users who didn’t load the analytics, because it was trying to send an event to log the creation of the new post.