commit a62e7e46bf2e475df60045aadcfc64f3d25600e3
parent 95ba68a75727f8087dcd43175a7d9a1bf47c3b99
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 26 Apr 2016 01:53:48 -0400
Remove some unreachable code
Addresses #974
Diffstat:
4 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js
@@ -438,8 +438,6 @@ Zotero.Collection.prototype.removeItems = Zotero.Promise.coroutine(function* (it
})
}
}.bind(this));
-
- yield this.loadDataType('childItems');
});
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js
@@ -2367,19 +2367,6 @@ Zotero.Item.prototype._updateAttachmentStates = function (exists) {
Zotero.Item.prototype.getFilename = function () {
Zotero.debug("getFilename() deprecated -- use .attachmentFilename");
return this.attachmentFilename;
- if (!this.isAttachment()) {
- throw new Error("getFileName() can only be called on attachment items");
- }
-
- if (this.attachmentLinkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) {
- throw new Error("getFilename() cannot be called on link attachments");
- }
-
- var file = this.getFile();
- if (!file) {
- return '';
- }
- return file.leafName;
}
diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js
@@ -973,21 +973,6 @@ Zotero.Sync.Runner_Module = function (options = {}) {
}
}
}
-
- // TEMP
- return;
-
- if (extraInfo) {
- // Server errors will generally be HTML
- extraInfo = Zotero.Utilities.unescapeHTML(extraInfo);
- Components.utils.reportError(extraInfo);
- }
-
- Zotero.debug(e, 1);
-
- if (!skipReload) {
- Zotero.reloadDataObjects();
- }
});
diff --git a/resource/bluebird.js b/resource/bluebird.js
@@ -109,7 +109,7 @@
return;
- if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+ /*if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}*/}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
"use strict";
module.exports = function(Promise) {
var SomePromiseArray = Promise._SomePromiseArray;