Skip to content

Commit

Permalink
fix(settings): Fix "disable add integrations" button
Browse files Browse the repository at this point in the history
closes #1439
  • Loading branch information
LulzAugusto authored and shantanuraj committed Jul 1, 2019
1 parent 4453b71 commit 16823df
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,21 @@ const Settings = {
const origins = [];
let i;
let key;
const customOrigins = await db.getAllOrigins();
const allOrigins = await db.getAllOrigins();
const customOrigins = {};
let skip = false;

try {
for (key in allOrigins) {
if (typeof allOrigins[key] === 'string') {
customOrigins[key] = allOrigins[key];
}
}

for (i = 0; i < result.origins.length; i++) {
for (key in customOrigins) {
if (customOrigins.hasOwnProperty(key) && !skip) {
if (result.origins[i].indexOf(key) !== -1) {
skip = true;
}
if (result.origins[i].indexOf(key) !== -1) {
skip = true;
}
}

Expand Down

0 comments on commit 16823df

Please sign in to comment.