The Vikings franchise is too often a derailed train veering into a dumpster fire. For decades, the Vikings have made “crisis management” an oxymoron.

Even during the relatively successful tenure of Rick Spielman and Mike Zimmer, the team has dealt with internal dramas and external embarrassments, and external dramas and internal embarrassments.

Just this summer, Zimmer and Spielman did all they could to muddle their kicking and punting competitions before finally landing on the solution that most teams begin with: Give the jobs to quality veterans on one-year contracts and spend your time and assets on something else.

But let’s give credit where it is due to a franchise that might have been overdue, in terms of making the best of a bad situation. The Vikings faced a crisis two weeks ago. They have not only survived, but they also appear to have righted themselves. They might have even set themselves up for a remarkable season.

The Vikings enter Sunday’s game in Detroit with the third-highest point differential in the NFL, behind only New England and San Francisco. They are 4-2, tied for the fifth-best record in the NFL. Their only losses were at Green Bay and Chicago, two strong teams with pronounced home-field advantages.

If the Vikings win Sunday, given that they play woeful Washington on Thursday, they should soon be 6-2.

Two weeks ago, they looked like a bad reality show. Their offense malfunctioned in Chicago, and quarterback Kirk Cousins looked helpless. He then apologized to one star receiver (Adam Thielen) while another (Stefon Diggs) skipped work and posted inscrutable messages on social media.

This drama had all of the markings of a sports disaster. The Vikings’ roster is built to win now, and three of the team’s most important and expensive players were conducting a relationship workshop, with one occasionally recusing himself. The team was 2-2, and both losses could be blamed on the $84 million quarterback, who was reviving every criticism ever levied at him.

When dysfunction rears its familiar head, fans and journalists demand “accountability” in the form of actions and answers. What the Vikings did, it turns out, was shrewd, perhaps even wise. They did as little as possible, at least publicly.

Zimmer didn’t rip Diggs. The organization didn’t bench or suspend him. The team did fine Diggs about $200,000, a large enough sum to get him to return to practice, but they didn’t publicize it — it just leaked, as most news does in the NFL.

Had they benched or suspended Diggs, they might have irreparably harmed their relationship with one of their best players. Instead, Spielman said nothing publicly (which is his habit), Zimmer didn’t overreact and players minded their own business, with Thielen doing all he could to calm the snark-infested waters.

The results:

• Against the Giants, Diggs again played a minor role in the offense but said what the team would have hoped he would say after the game, even if muddying the message with a conspiratorial wink.

• Against the Eagles, Vikings offensive coordinator Kevin Stefanski tailored a game plan to take advantage of Diggs, who produced three touchdowns, further dousing the embers.

The Vikings’ handling of this potential problem sets them up to win. What appeared to be a daunting second-half schedule now features the slumping Cowboys, the slumping Chargers and the Chiefs possibly without Patrick Mahomes.

This is the stuff of small sample sizes, but the NFL is all about small sample sizes. Losing four Super Bowls is a small sample size that defines the franchise.

The Vikings’ recent crisis management won’t matter much if they don’t beat the Lions, or if Cousins doesn’t play well down the stretch, but the Vikings have a chance to, for once, make a clean escape from dysfunction junction.

That would be strange, and important, for a team with a lot of jobs on the line, and a history of turning bad into worse.