Hide elements if the contents manager are blank

Hello, i have a website that want to use contents manager to show the information.
There are few items doesn’t have show on the page, so i would like to hide them if the contents manager are blank,
I made the code as below to hide the “text155” if the dataset1 is blank.

it seems its not working,
if anyone can give me some feedback for what i am trying to do,
ill be appreciate!

$w.onReady(function() {
    $w("#dataset1").onReady(() => { 
     let Restaurant = $w("#dataset1").getCurrentItem();

     	if(Restaurant .showsub === true){
    	   	$w("#text155").show();
		$w("#text155").expand();
 		} else{
    		$w("#text155").hide();
	      $w("#text155").collapse();
 		}
 
	 });
 });