add a check to see if the js block exists