Minor lint fixes

This commit is contained in:
Samuel Crypto 2018-10-11 18:00:12 -04:00
parent 34bde83067
commit 2a78aceac6

View file

@ -1,10 +1,10 @@
//Below lets us print errors, huge thanks to Jonothan @ https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify //Below lets us print errors, huge thanks to Jonothan @ https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify
if (!('toJSON' in Error.prototype)) if (!("toJSON" in Error.prototype))
Object.defineProperty(Error.prototype, 'toJSON', { Object.defineProperty(Error.prototype, "toJSON", {
value: function () { value: function() {
var alt = {}; let alt = {};
Object.getOwnPropertyNames(this).forEach(function (key) { Object.getOwnPropertyNames(this).forEach(function(key) {
alt[key] = this[key]; alt[key] = this[key];
}, this); }, this);
@ -12,7 +12,7 @@ Object.defineProperty(Error.prototype, 'toJSON', {
}, },
configurable: true, configurable: true,
writable: true writable: true
}); });
//This object allows other scripts to access the list mapping containers to their proxies //This object allows other scripts to access the list mapping containers to their proxies
@ -61,7 +61,7 @@ window.proxifiedContainers = {
} else { } else {
const val = results_array.find(o => o.cookieStoreId === cookieStoreId); const val = results_array.find(o => o.cookieStoreId === cookieStoreId);
if (typeof val !== "object" ) { if (typeof val !== "object" || val === null) {
reject({ reject({
error: "doesnotexist", error: "doesnotexist",
message: "" message: ""