Use correct property in Zotero.Libraries.getVersion/setVersion()
This commit is contained in:
parent
add9481c63
commit
0965079842
|
@ -203,9 +203,9 @@ Zotero.Libraries = new function () {
|
||||||
* @return {Integer}
|
* @return {Integer}
|
||||||
*/
|
*/
|
||||||
this.getVersion = function (libraryID) {
|
this.getVersion = function (libraryID) {
|
||||||
Zotero.debug("Zotero.Libraries.getVersion() is deprecated. Use Zotero.Library.prototype.version instead");
|
Zotero.debug("Zotero.Libraries.getVersion() is deprecated. Use Zotero.Library.prototype.libraryVersion instead");
|
||||||
this._ensureExists(libraryID);
|
this._ensureExists(libraryID);
|
||||||
return Zotero.Libraries.get(libraryID).version;
|
return Zotero.Libraries.get(libraryID).libraryVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,11 +217,11 @@ Zotero.Libraries = new function () {
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
this.setVersion = Zotero.Promise.method(function(libraryID, version) {
|
this.setVersion = Zotero.Promise.method(function(libraryID, version) {
|
||||||
Zotero.debug("Zotero.Libraries.setVersion() is deprecated. Use Zotero.Library.prototype.version instead");
|
Zotero.debug("Zotero.Libraries.setVersion() is deprecated. Use Zotero.Library.prototype.libraryVersion instead");
|
||||||
this._ensureExists(libraryID);
|
this._ensureExists(libraryID);
|
||||||
|
|
||||||
let library = Zotero.Libraries.get(libraryID);
|
let library = Zotero.Libraries.get(libraryID);
|
||||||
library.version = version;
|
library.libraryVersion = version;
|
||||||
return library.saveTx();
|
return library.saveTx();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user