In a blow to pedants everywhere, it appears the correct spelling of the phrase is “just deserts” rather than “desserts”.
The editors at Merriam-Webster dictionary posted the following on Twitter:
'Just deserts': when one gets the punishment one deserves
'Just desserts': a child's dream dinner
In the accompanying post, this startling fact was explained in more detail:
Despite its pronunciation, just deserts, with one s, is the proper spelling for the phrase meaning "the punishment that one deserves." The phrase is even older than dessert, using an older noun version of desert meaning "deserved reward or punishment," which is spelled like the arid land, but pronounced like the sweet treat.
The most telling part of the post sees the people behind the dictionary explain:
The English language is fond of occasionally embracing its whimsical and illogical side, in order to keep things interesting for the people who attempt to use it.