Maptio / maptio

http://www.maptio.com
Other
24 stars 5 forks source link

Circles can't be deleted when any circle has undefined children #758

Closed rgoj closed 2 years ago

rgoj commented 2 years ago

Problem

A customer tried deleting a circle and nothing happened. The report (along with a video demonstration) is available here: https://app.intercom.com/a/apps/q3x5lnhp/conversations/106323200003942

Cause of the issue

Initially I thought this was due to yesterday's deployment of map locking functionality. However, I couldn't reproduce the problem. Finally I was able to do so using customer data. The problem lay in a classic unguarded accessing of a property of a property that was undefined (children of an initiative). The solution is simple and obvious, but I'm writing this up to leave a trace of the issue because I'm concerned that this hasn't been noticed before, which makes me worried that something is now setting children to undefined when it wasn't before. Couldn't find anything so far, but might be something to look out for.