Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngOnInit() {
const currentItems = this.map.layers.map((layer: Layer) => {
return {
id: layer.options.source.id,
title: layer.title,
type: CatalogItemType.Layer
};
});
this.store.state.updateMany(currentItems, { added: true }, true);
if (this.catalog && this.catalog.sortDirection !== undefined) {
this.store.view.sort({
direction: this.catalog.sortDirection,
valueAccessor: (item: CatalogItem) => item.title
});
}
this.watcher = new EntityStoreWatcher(this.store, this.cdRef);
}
ngOnInit() {
this.watcher = new EntityStoreWatcher(this.store, this.cdRef);
}