Merge pull request #5639 from cmgustavo/bug/duplicated-home-integrations

Fix duplicated home integration items
This commit is contained in:
Javier Donadío 2017-02-21 09:33:08 -05:00 committed by GitHub
commit a4fd5cf87b

View file

@ -1,9 +1,11 @@
'use strict';
angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) {
angular.module('copayApp.services').factory('homeIntegrationsService', function(lodash, configService, $log) {
var root = {};
var services = [];
root.register = function(serviceInfo) {
// Check if already exists
if (lodash.find(services, { 'name': serviceInfo.name })) return;
$log.info('Adding home Integrations entry:' + serviceInfo.name);
services.push(serviceInfo);
};