Replace getTargets with getStatementsMatching (#768)

As suggested in the same file `getTargets` is deprecated since 2.1
This commit is contained in:
Philipp Zumstein 2018-08-11 20:36:43 +02:00 committed by Dan Stillman
parent a97abed533
commit ea8b15a44a

View file

@ -3080,7 +3080,7 @@ Zotero.Translate.IO._RDFSandbox.prototype = {
if(typeof(resource) == "string") return resource;
const rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
var values = this.getTargets(resource, rdf + 'value');
var values = this.getStatementsMatching(resource, rdf + 'value');
if(values && values.length) return this.getResourceURI(values[0]);
if(resource.uri) return resource.uri;