Pacifier while baby sleeps.

Hello!

Baby fell asleep with a pacifier tonight, she usually spits it out a bit later, tonight she did not and three hours later it was still in her mouth while she slept. I took it out. Is that ok? Would you keep it for the baby to suck it would you take it out like I did?