Allow /connector/document/respond to take non-double JSON encoded data
This commit is contained in:
parent
3666da5b22
commit
c3c7f0a8ae
1 changed files with 6 additions and 2 deletions
|
@ -56,8 +56,12 @@ Zotero.Server.Endpoints['/connector/document/respond'].prototype = {
|
|||
supportedDataTypes: ["application/json"],
|
||||
permitBookmarklet: true,
|
||||
|
||||
init: function(data, sendResponse) {
|
||||
data = JSON.parse(data);
|
||||
init: function (data, sendResponse) {
|
||||
// Earlier version of the gdocs plugin used to double-encode the JSON data
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
catch (e) {}
|
||||
if (data && data.error) {
|
||||
// Apps Script stack is a JSON object
|
||||
if (typeof data.stack != "string") {
|
||||
|
|
Loading…
Reference in a new issue