my boss has a Maltese and takes him with us to jobs. sometimes when he sits on my lap he will do little bites on my wrists not enough to hurt my boss asked the vet about it and the vet said it's the breed the dog will "nibble" to show affection to someone the dog likes
Some animals get whats called petting induced aggresion. When you pet your dog it induces sensory overload so your dog does not want to bite you but it cannot help or control it. See your dog's vet for a treatment plan.