Closed johnd0e closed 5 years ago
Error source found: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/d77562b91a5b1e0bf170b4257eb33316a0b9daa3/plugins/cache-details-on-map.user.js#L20-L22
We need to check data.success
here, because the same hook is called on failure too:
https://github.com/IITC-CE/ingress-intel-total-conversion/blob/d77562b91a5b1e0bf170b4257eb33316a0b9daa3/code/portal_detail.js#L55-L61
And this leads to caching empty items, with ent
property undefined
.
Sometimes I see this error in debug console:
It occurs here: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/d77562b91a5b1e0bf170b4257eb33316a0b9daa3/code/map_data_render.js#L109-L117
The function
processGameEntities
is called via hook:https://github.com/IITC-CE/ingress-intel-total-conversion/blob/d77562b91a5b1e0bf170b4257eb33316a0b9daa3/code/map_data_request.js#L245
Hook is called from
plugin.cachePortalDetailsOnMap.entityInject(data)
: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/d77562b91a5b1e0bf170b4257eb33316a0b9daa3/plugins/cache-details-on-map.user.js#L24-L36