The law was designed to stop state funds from going to companies that boycott the fossil‑fuel industry.