It could be
undefined so this
Isn’t correct, because it says that it’s a string that’s always present. It it’s possibly not there you need to specify that it possibly won’t be there or is optional
Sorry misread the error. Above may still be true, but it’s the
GitUser itself that may not be there.
You need to handle the possibility that
GitUser itself may be undefined (or null or whatever), at the minute something in your code is assuming it will always exist – ie you are trying to access properties on the GitUser object. That will cause your app to fall over if the GitUser isn’t there, that’s what the error is telling you and why it won’t compile