> The problem is that there was no primary.
I think a primary would have led to worse results for the Dems: candidates snipping at each on the eve of an elections is a gift to the opposing candidate; who can add a final 5-seconds stinger to the end of the many intra-party attack ads against the nominee to say "I am _, and I approve of this message".
Intra-party elections should definitely be some variant of ranked-choice voting. To at least try to avoid the current fractal polarization.