Skip to content

Commit e4edb73

Browse files
committed
check value is a string before calling toUpperCase()
1 parent 4953967 commit e4edb73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assets/client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,13 @@ function processObject(object, toplevel, followReferral=true, followingReferral=
443443
card.classList.add('card');
444444

445445
var titleText = '';
446-
if (object.hasOwnProperty("unicodeName")) {
446+
if (object.hasOwnProperty("unicodeName") && 'string' == typeof object.unicodeName) {
447447
titleText = object.unicodeName.toUpperCase();
448448

449-
} else if (object.hasOwnProperty("ldhName")) {
449+
} else if (object.hasOwnProperty("ldhName") && 'string' == typeof object.ldhName) {
450450
titleText = object.ldhName.toUpperCase();
451451

452-
} else if (object.hasOwnProperty("handle")) {
452+
} else if (object.hasOwnProperty("handle") && 'string' == typeof object.handle) {
453453
titleText = object.handle.toUpperCase();
454454

455455
}

0 commit comments

Comments
 (0)