Tag Archives: freemaker null Error

How to Solve freemaker null Error

Error analysis

Today, I encountered a problem. When I get the parent ID , I found that if it is a parent classification, an error will be reported when I go back to the parent ID

the following styles fail directly.

Solution:

Add a default value of 0. The code is as follows:

var cate_parentId = ${category.parentId ! 0};