At the moment the are cautiously recommending eating some nuts as they suspect (but haven't yet proved convincingly) that actually avoiding all nuts in pregnancy can INCREASE the risk of allergies, and if you eat nuts when pregnant you can help protect against allergies developing later. (i.e. yes exactly the opposite of what used to be recommended). But they aren't sure yet.
basically the advice for a while was to not eat them in case they caused allergies, but allergy rates soared while that advice was active, so now the advice is fine to eat them yourself as evidently, being advised to avoid them doesn't prevent allergies!
Countries where nut allergies are least common have very little advice about avoiding them. Make of that what you will.