Nothing can deter Mayor Bill de Blasio from his near-daily excursion to Park Slope.

Hizzoner insisted on getting in his morning workout Wednesday even after the Park Slope YMCA received a racist bomb threat targeting the mayor, The Post has learned.

De Blasio was en route to his Brooklyn gym around 7:15 a.m. when the YMCA on Ninth Street received the warning.

The caller stated that “it [the gym] is going to blow up when Mayor de Blasio goes there because he is running for president and he loves black people,” a police source said.

The call came from the Upper West Side, possibly on Columbus Avenue, a source said.

“They did a sweep, but just of people that were there, and the local precinct evacuated the Y — less than 100 people were in there,” said a source.

The mayor by that time was in Park Slope, where a source said he was at one of his favorite haunts, the Colson Patisserie, while the search was being conducted, then went to the Y around 8:30 am and left at 10:15.

“He was on his way when it was called in,” mayoral spokeswoman Freddi Goldstein confirmed.

In a statement, the YMCA said it’s helping the NYPD with the investigation “since they brought this to our attention, and we will take every precaution to ensure that everyone is safe.”

Stanley Garcia, 58, a regular at the gym, said the cops handled the situation well — but he believes de Blasio is putting the neighborhood in danger by frequenting the place.

“It’s not fair,” the Crown Heights resident said. “He’s risking the lives of the young ones that come here. He could be somewhere else. They’ve got Crunch, they’ve got Blink.”