So...in trying to fix #305, it turns out that we were already checking if the description was undefined, and self was already set to this. There were no code paths I could find which would result in this.descriptionText to actually be undefined. But it was possible for the error to show up if a profile's description was something other than a string where matchAll was not defined on it. So under the premise that that's probably actually what was causing that error, this changes the this reference to self for consistency and adds a check to ensure that the description is actually a string before trying to run the regular expression on it.
So...in trying to fix #305, it turns out that we were already checking if the description was undefined, and
self
was already set tothis
. There were no code paths I could find which would result inthis.descriptionText
to actually beundefined
. But it was possible for the error to show up if a profile's description was something other than a string wherematchAll
was not defined on it. So under the premise that that's probably actually what was causing that error, this changes thethis
reference toself
for consistency and adds a check to ensure that the description is actually a string before trying to run the regular expression on it.Fixes #305