cant edit publication without attachment

This commit is contained in:
Peter Maquiran
2024-07-25 16:01:02 +01:00
parent 2c7bf9bea4
commit 6b0c0af26f
4 changed files with 30 additions and 30 deletions
@@ -116,7 +116,6 @@ export class NewPublicationPage implements OnInit {
private modalController: ModalController,
public photoService: PhotoService,
private navParams: NavParams,
private toastService: ToastService,
public ThemeService: ThemeService,
private platform: Platform,
public imageCompress: NgxImageCompressService,
@@ -136,7 +135,7 @@ export class NewPublicationPage implements OnInit {
this.publicationType = this.navParams.get('publicationType');
this.folderId = this.navParams.get('folderId');
const publication = this.navParams.get('publication');
if (publication && typeof publication?.Files == 'object') {
if (publication && Array.isArray(publication?.Files)) {
this.filecontent = true;
const newFiles: PublicationAttachmentEntity[] = publication.Files.map(e => {
@@ -177,14 +176,14 @@ export class NewPublicationPage implements OnInit {
}
ngOnInit() {
this.reciveSharedContent();
// this.reciveSharedContent();
this.setTitle();
Filesystem.mkdir({
path: IMAGE_DIR,
directory: Directory.Data,
recursive: true
});
// this.setTitle();
// Filesystem.mkdir({
// path: IMAGE_DIR,
// directory: Directory.Data,
// recursive: true
// });
/* try {
document.addEventListener("click", clickOutside, false);