Fix "val.indexOf is not a function" loading attachments with all-numeric titles
This commit is contained in:
parent
3ab09692a2
commit
33a6caef15
|
@ -162,6 +162,10 @@
|
||||||
}
|
}
|
||||||
var val = this.item.getField('title');
|
var val = this.item.getField('title');
|
||||||
|
|
||||||
|
if (typeof val != 'string') {
|
||||||
|
val += "";
|
||||||
|
}
|
||||||
|
|
||||||
var firstSpace = val.indexOf(" ");
|
var firstSpace = val.indexOf(" ");
|
||||||
// Crop long uninterrupted text
|
// Crop long uninterrupted text
|
||||||
if ((firstSpace == -1 && val.length > 29 ) || firstSpace > 29) {
|
if ((firstSpace == -1 && val.length > 29 ) || firstSpace > 29) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user