Diff shows MR has no changes when diffs_batch endpoint responds faster than the diffs_metadata

I'm seeing an inconsistent behavior after enabling the FF diffs_batch_load locally. From time to time, when reloading the MR diffs page, here's what I see:

Screen_Shot_2019-11-28_at_19.43.33

If I reload a few more times it simply presents the spinner, then show the files.

The diffs_batch JSON has the expected payload. I'm assuming it's a race-condition of some sort in the frontend? I believe it happens if the /diffs_batch endpoint responds faster than /diffs_metadata.

cc @andr3 @jboyson

Edited by Oswaldo Ferreira