mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
[ACS-6342] Updated ExtensionService code to use pre-existing methods for merging arrays/objects
This commit is contained in:
parent
8b6fb77fe8
commit
4cb11a8217
@ -26,6 +26,7 @@ import { ComponentRegisterService } from './component-register.service';
|
|||||||
import { RuleService } from './rule.service';
|
import { RuleService } from './rule.service';
|
||||||
import { ExtensionElement } from '../config/extension-element';
|
import { ExtensionElement } from '../config/extension-element';
|
||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
|
import { mergeArrays, mergeObjects } from '../config/extension-utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default extensions factory
|
* The default extensions factory
|
||||||
@ -110,7 +111,13 @@ export class ExtensionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
appendConfig(partialConfig: ExtensionConfig) {
|
appendConfig(partialConfig: ExtensionConfig) {
|
||||||
this.config = { ...this.config, ...partialConfig };
|
this.config = { ...this.config,
|
||||||
|
rules: mergeArrays(this.config.rules, partialConfig.rules),
|
||||||
|
features: mergeObjects(this.config.features, partialConfig.features),
|
||||||
|
routes: mergeArrays(this.config.routes, partialConfig.routes),
|
||||||
|
actions: mergeArrays(this.config.actions, partialConfig.actions),
|
||||||
|
appConfig: mergeObjects(this.config.appConfig, partialConfig.appConfig)
|
||||||
|
};
|
||||||
this.setup(this.config);
|
this.setup(this.config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user