Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClickAddSite() {
const newSiteEntry: SiteEntry = new SiteEntry({ entry: { title: this.customSideTitle, guid: this.customSideGuid } });
this.customSites.list.entries.push(newSiteEntry);
this.customSideGuid = '';
this.customSideTitle = '';
}
this.sitesService.getSites(extendedOptions).subscribe((sitePaging: SitePaging) => {
if (!this.siteList) {
this.siteList = this.relations === Relations.Members ? this.filteredResultsByMember(sitePaging) : sitePaging;
if (!this.hideMyFiles) {
const siteEntry = new SiteEntry({
entry: {
id: '-my-',
guid: '-my-',
title: 'DROPDOWN.MY_FILES_OPTION'
}
});
this.siteList.list.entries.unshift(siteEntry);
if (!this.value) {
this.value = '-my-';
}
}
} else {
const siteList: SitePaging = this.relations === Relations.Members ? this.filteredResultsByMember(sitePaging) : sitePaging;
this.sitesService.getSites(extendedOptions).subscribe((sitePaging: SitePaging) => {
if (!this.siteList) {
this.siteList = this.relations === Relations.Members ? this.filteredResultsByMember(sitePaging) : sitePaging;
if (!this.hideMyFiles) {
const siteEntry = new SiteEntry({
entry: {
id: '-my-',
guid: '-my-',
title: 'DROPDOWN.MY_FILES_OPTION'
}
});
this.siteList.list.entries.unshift(siteEntry);
if (!this.value) {
this.value = '-my-';
}
}
} else {
const siteList: SitePaging = this.relations === Relations.Members ? this.filteredResultsByMember(sitePaging) : sitePaging;