Cameras caught the 21-year-old sticking his middle finger up in an obscene manner in the 76th minute of the game, with it initially thought that the gesture had been made in the direction of referee Clement Turpin.
Both Alli and England boss Gareth Southgate denied that after the game, saying that it had been aimed at Kyle Walker and intended as a joke.
Alli has since apologised for his actions and West Ham stopper Hart has now given his view on the incident.
"The world is watching and Dele appreciates that," explained Hart.
"He is a young expressive guy who is trying to get to the peak of his game and sometimes he is going to do things that not everyone is going to agree with.
"I think we all know what has gone on - no one has got hurt from it, let's be honest.
"Luckily and hopefully it was after 9pm and after the watershed. Kids are watching, Dele appreciates that. I'm sure it will be dealt with in the right way."
Alli could face discliplinary action for the gesture, though much depends on what the referee includes in his match report.