]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Correctly fix video import notification
authorChocobozzz <me@florianbigard.com>
Wed, 20 Feb 2019 14:46:33 +0000 (15:46 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 20 Feb 2019 14:46:33 +0000 (15:46 +0100)
If the imported video is deleted

client/src/app/shared/users/user-notification.model.ts
client/src/app/shared/users/user-notifications.component.html

index 5d0dc19ae829d0d9d9572df202f0f3a3e7795f70..0978307527c4ad065c79ba7dc6e96ba68e949eb9 100644 (file)
@@ -118,7 +118,8 @@ export class UserNotification implements UserNotificationServer {
         case UserNotificationType.MY_VIDEO_IMPORT_SUCCESS:
           this.videoImportUrl = this.buildVideoImportUrl()
           this.videoImportIdentifier = this.buildVideoImportIdentifier(this.videoImport)
-          this.videoUrl = this.buildVideoUrl(this.videoImport.video)
+
+          if (this.videoImport.video) this.videoUrl = this.buildVideoUrl(this.videoImport.video)
           break
 
         case UserNotificationType.MY_VIDEO_IMPORT_ERROR:
index 0d69e0febde0f089f41b17db015e2026f64efc23..1c0af1bb0d204a9bedf052d6440a2796c0c3a0d6 100644 (file)
@@ -56,7 +56,7 @@
         <my-global-icon iconName="cloud-download"></my-global-icon>
 
         <div class="message">
-          <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
+          <a (click)="markAsRead(notification)" [routerLink]="notification.videoUrl || notification.videoImportUrl">Your video import</a> {{ notification.videoImportIdentifier }} succeeded
         </div>
       </ng-container>