I think it's a bug between node-red and dashboard.
I fixed dashboard app.min.js file to solve undefined problem.
Download this file - https://github.com/martinLim45/share/blob/master/app.min.js
and replace node_modules/node-red-dashboard/dist/js/app.min.js.