The Save & insert into post button in Stack Snippets sometimes throws an error and the popup doesn't close.
Uncaught TypeError: Cannot read property 'save' of undefined
When I refresh the page and try it again, it works fine. This is not a recent issue. It happens couple of times a day.
Console:
Prettified source code which throws the error: