Okay
  Print

Can not read Property Length of undefined?

Make sure your shopify prismic category have a parent category.

Also make sure your parent category have at lease one category that is selected your parent category otherwise you will get this error.