How to resolve problem with chain select Uncaught TypeError: Cannot read property 'forEach' of undef