commit 3214e37d92787c1a6e19216faf037e7a4a99a4e6 parent e3da547c81e4c4385651c4973224be6681134762 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 8 May 2015 02:42:48 -0400 Ignore empty 'filename' property in Item.fromJSON() Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -4074,7 +4074,12 @@ Zotero.Item.prototype.fromJSON = Zotero.Promise.coroutine(function* (json) { break; case 'filename': - this.attachmentFilename = val; + if (val === "") { + Zotero.logError("Ignoring empty attachment filename in item JSON"); + } + else { + this.attachmentFilename = val; + } break; case 'path':