Ugh, I opened a second tab on my browser (the beta Makecode editor) to look at an extension that was being used in the project in the first tab. I switched back to the first tab and when I did that it switched from Javascript to Block view and I quickly pressed the button at the top to make it go back to JS before it had finished thinking.
The result of this was that the code was completely deleted. Empty project.