Updated

J.K. Rowling has given her “absolute blessing” to a black actress playing Hermione in London stage productionHarry Potter and the Cursed Child,” and slammed those who criticized the casting in a new interview.

The “Harry Potter” author praised Olivier-winning British thesp Noma Dumezweni as the “best actress for the job,” and said her prior experience with social media led her to believe that “idiots were going to idiot” over the casting.

“I had a bunch of racists telling me that because Hermione ‘turned white’ — that is, lost color from her face after a shock — that she must be a white woman, which I have a great deal of difficulty with,” she told the Observer in an article published this weekend.  “But I decided not to get too agitated about it and simply state quite firmly that Hermione can be a black woman with my absolute blessing and enthusiasm.”

When the casting was first announced last year, Rowling affirmed that she never defined Hermione’s race in the books, and said she “loved” the idea of a non-white actress filling the scholarly character’s shoes. Emma Watson played Hermione in the eight Harry Potter films from 2001 to 2011.

In the same article, director John Tiffany says he was “shocked [that] people couldn’t visualise a non-white person as the hero of a story.”

The two-part production “Harry Potter and the Cursed Child” begins previewing at the London’s Palace Theatre on Tuesday.