var availableDevices = Object.keys(devices).reduce(function (availAcc, deviceCategory) { var availableDevicesInCategory = devices[deviceCategory]; availableDevicesInCategory.forEach(function (device) { if (device && device.name === deviceType.name.replace(/\-inch/g, ' inch') && device.isAvailable == true) { availAcc.push(device); } }); return availAcc; }, []);

TypeError: Cannot read property 'name' of undefined ionic

Similar Code Examples