mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Publication fix delete publication when there is only one element
This commit is contained in:
@@ -122,6 +122,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
if(error.status == '404'){
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
this.publicationList= [];
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
@@ -113,7 +113,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
(error)=>{
|
||||
if(error.status == '404') {
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
// this.publicationList = null;
|
||||
this.publicationList= [];
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
@@ -31,7 +31,7 @@ export class PublicationListService {
|
||||
return this._document[folderId]
|
||||
}
|
||||
|
||||
add(folderId, document) {
|
||||
add(folderId, document = []) {
|
||||
this._document[folderId] = document
|
||||
|
||||
setTimeout(()=> {
|
||||
|
||||
Reference in New Issue
Block a user