diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js index 88824e00cd..aad09b4be8 100755 --- a/chrome/content/zotero/xpcom/server.js +++ b/chrome/content/zotero/xpcom/server.js @@ -431,7 +431,7 @@ Zotero.Server.DataListener.prototype._processEndpoint = Zotero.Promise.coroutine 'multipart/form-data', 'text/plain' ]; - var isBrowser = this.headers['user-agent'].startsWith('Mozilla/') + var isBrowser = (this.headers['user-agent'] && this.headers['user-agent'].startsWith('Mozilla/')) // Origin isn't sent via fetch() for HEAD/GET, but for crazy UA strings, protecting // POST requests is better than nothing || 'origin' in this.headers;