Scaffold: Fix copying JSON test data
Previously only copied '[object Object]'.
This commit is contained in:
parent
b5ce8b655a
commit
1aebad3c19
1 changed files with 3 additions and 0 deletions
|
@ -1759,6 +1759,9 @@ var Scaffold = new function () {
|
|||
var url = item.getElementsByTagName("label")[0].getAttribute("value");
|
||||
var test = JSON.parse(item.dataset.testString);
|
||||
var urlOrData = (test.input !== undefined) ? test.input : url;
|
||||
if (typeof urlOrData !== 'string') {
|
||||
urlOrData = JSON.stringify(urlOrData, null, '\t');
|
||||
}
|
||||
Zotero.Utilities.Internal.copyTextToClipboard(urlOrData);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue