Situations were different but I do think the chapter was more than just Sanji putting Robin in danger. It was him actually trusting her with an opponent he's faced first-hand. Like him depending on Zoro to handle Monet or Usopp to deal with Page One except this time, it's a female character. At Ennies Lobby, he only left after Sanji chastised him for his pride but it's clear he's actually learned to put faith in his crew. Plus, Sanji only did this after the Scabbards were in trouble. Robin can handle herself against Black Maria, Scabbards can't against the people being sent after them. I thought it was an interesting end.
Sanji does come off as pathetic, Oda even has dudes who don't even know Sanji, like Heat, calling him that but the members of his crew that know both him and Robin, completely understand the situation. Nami immediately knew what was up and contrast the Straw Hats (those familiar with the crew) with Sasaki, Sasaki laughs at Sanji, highlighting that it's a trap whereas the rest comprehend it or stay silent and don't show much concern despte being aware of the implications of Sanji calling Robin there, since they're actually familiar with Sanji.
I don't know, that's how I interpret it anyway. Sanji's always been a liability in regards to women, I'm not saying that's good. He should be criticised for that but it's treated, in story as a flaw and while it hinders the crew, they've accepted it.