There are 2 vents in the top of the tank. Some call them roll over valves, cause they seal in the event of a roll over to keep gas from spilling out. either these are bad or the hose going from them to the breather that they are connected to has become plugged. On the older ones the hose runs to the charcoal canister up by the drivers front wheel. Newer YJ's have the canister in the passenger rear wheel well up under the plastic cover.
Let it breathe, and it will prevent the vapor lock.