He should not, take it personally.
She is 18 months. Developmentally, they go through a TON of things, and they do not know everything yet.
She is a child.
At this age, they go through all kinds of phases.
My son, when he was about that age, was SCARED of an Uncle, whom he knows and has been around a lot before. My Uncle didn't take it personally. Why should he? My son was just a young Toddler. My son, was "scared" of Uncle, because of the way he looked. He has wild bushy gray and white hair. And when he doesn't shave, he looks like a cave-man. And his voice, really carries, even if he is not talking loud. So all of that, just scared, my son. Oh well. Then one day, my son just grew out of it. And my son doesn't even remember being afraid of Uncle. He really likes, his Uncle.
AND.... kids can really feel the vibes of others. So, if your Husband is stressed and tense when he comes home, and it is because... your Granddaughter cries when he is around, then, your granddaughter is probably... just feeling your Husband's vibes. And it makes her upset.
Your Husband should not get all hurt and mad that his granddaughter is going through a phase. He is an adult. She is the child.
Perhaps, read a book about child development. "What To Expect The Toddler Years" or just Google search "18 month old development."
Kids this age... do not even have, fully developed emotions or communication, nor do they even have full understanding of abstract feelings and they don't even know why they feel a certain way or not. They don't even know the "names" for feelings etc.
So perhaps, if your Husband knows this, he won't be just mad at your granddaughter and take it all so personally.