diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 6cc9ad33a1..e2e09b99e3 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -2479,8 +2479,9 @@ Zotero.Attachments = new function () { this.isRenameAllowedForType = function (contentType) { let typePrefixes; try { - typePrefixes = (Zotero.Prefs.get('autoRenameFiles.fileTypes') || '') - .split(','); + let prefValue = Zotero.Prefs.get('autoRenameFiles.fileTypes'); + if (!prefValue) return false; + typePrefixes = prefValue.split(','); } catch (e) { typePrefixes = [];