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