Tengo el siguiente problema con esta función:
private async findOrCreatePanel(serviceId: string): Promise<Panel> { await this.panelService.getActivePanels().subscribe(activePanels => { const existingPanel = activePanels.find(panel => panel.serviceId === serviceId) if (existingPanel) { return existingPanel; } }); await this.panelService.addActiveFromService(serviceId).subscribe(newPanel => { return newPanel; }); return }En lugar de esperar a que finalice await, va muy rápido al último retorno y devuelve nulo, ¿cómo podría solucionar esto?