[HF] add a check to see if the js block exists