Fix duplicated home integration items
This commit is contained in:
parent
d00cd5b25d
commit
0898198cb3
1 changed files with 3 additions and 1 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) {
|
angular.module('copayApp.services').factory('homeIntegrationsService', function(lodash, configService, $log) {
|
||||||
var root = {};
|
var root = {};
|
||||||
var services = [];
|
var services = [];
|
||||||
|
|
||||||
root.register = function(serviceInfo) {
|
root.register = function(serviceInfo) {
|
||||||
|
// Check if already exists
|
||||||
|
if (lodash.find(services, { 'name': serviceInfo.name })) return;
|
||||||
$log.info('Adding home Integrations entry:' + serviceInfo.name);
|
$log.info('Adding home Integrations entry:' + serviceInfo.name);
|
||||||
services.push(serviceInfo);
|
services.push(serviceInfo);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue