Bug 1233438 - Fix error in TelemetryEnvironment for addons where description is undefined. r=gfritzsche

This commit is contained in:
Georg Fritzsche 2015-12-18 17:25:47 +07:00
parent 48e0d20f60
commit 4a41bbdf57

View File

@ -261,7 +261,7 @@ function getGfxField(aPropertyName, aDefault) {
* @return {String} The substring or null if the input string is null.
*/
function limitStringToLength(aString, aMaxLength) {
if (aString === null) {
if (aString === null || aString === undefined) {
return null;
}
return aString.substring(0, aMaxLength);