Dietrich was hit by a foul line drive off the bat of teammate Christian Yelich in the top of the ninth inning. According to MLB.com's Joe Frisaro, the ball split the opening near the dugout steps before bouncing off the back wall and hitting Dietrich.
X-rays came back negative, the Marlins announced after the game.
The 26-year-old was shown sitting up in the Marlins' dugout after the incident, but he didn't return to the field in the bottom half of the inning. He was later attended to by emergency medical technicians in the clubhouse.
Dietrich finished the night 2-for-3 with a home run and four RBIs.