GroceriStar / groceristar

Organize your shopping experience(under heavy development), https://groceristar.github.io/ubersicht/ https://waffle.io/GroceriStar/groceristar
http://groceristar.herokuapp.com/
Other
33 stars 18 forks source link

TypeError: Cannot read property 'id' of undefined #247

Open atherdon opened 7 years ago

atherdon commented 7 years ago

https://sentry.io/atherdon/grocery/issues/393702255/

TypeError: Cannot read property 'id' of undefined
  File "F:\code\NMTG\passport\loopback-fb-login\server\models\grocery.js", line 124, in null.<anonymous>
    return item.department.id.toString();
  File "F:\code\NMTG\passport\loopback-fb-login\node_modules\underscore\underscore.js", line 399, in null.<anonymous>
    var key = iteratee(value, index, obj);
  File "F:\code\NMTG\passport\loopback-fb-login\node_modules\underscore\underscore.js", line 153, in Function._.each._.forEach
    iteratee(obj[i], i, obj);
  File "F:\code\NMTG\passport\loopback-fb-login\node_modules\underscore\underscore.js", line 398, in Function.groupBy
    _.each(obj, function(value, index) {
  File "F:\code\NMTG\passport\loopback-fb-login\server\models\grocery.js", line 122, in Function.Grocery.convertCollectionData
    var uniques = _.map(_.groupBy(g.ingredients, function(item){
...
(2 additional frame(s) were not displayed)

TypeError: Cannot read property 'id' of undefined

image it was caused ,when i test create new ing, and maybe some data start to be broken

atherdon commented 7 years ago

https://sentry.io/atherdon/grocery/issues/393735835/

atherdon commented 7 years ago

251