help! hiding a section if the reference fields is empty

Try const instead of let:

$w . onReady (() => {

$w ( "#dynamicDataset" ). onReady (() => { 

const item = $w ( “#dynamicDataset” ). getCurrentItem ();

**if**  (! item . nutrishion ) { 
        $w ( "#section7" ). hide (); 
        $w ( "#section7" ). collapse (); 
    } 

 }); 

});