The WeChat applet reports an error Setting data field "variableName" to undefined is invalid.

Setting data field "variableName" to undefined is invalid. Setting data field "variableName" to undefined is invalid
.

When this happens, when the page is setData, the value is not obtained, and then undefined is given to the variableName field. At this time, the default field will become undefined, then this problem will occur. The solution is to setData. Determine whether the obtained value exists, if not, give a default value

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324970970&siteId=291194637