www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 33a6caef1505e2de5a5d21f1883c123874fd2aef
parent 3ab09692a2720660491d0e719f2280728450a0ec
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 17 Mar 2011 20:16:10 +0000

Fix "val.indexOf is not a function" loading attachments with all-numeric titles


Diffstat:
Mchrome/content/zotero/bindings/attachmentbox.xml | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/bindings/attachmentbox.xml b/chrome/content/zotero/bindings/attachmentbox.xml @@ -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) {