Skip to content

Commit

Permalink
Fix null error on spotify sort
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmenon committed Dec 9, 2023
1 parent d2ef6e0 commit a4a0d82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1 class="page-title"><i class="fa fa-spotify"></i> Spotify Library Album Sort<
<ng-template [ngIf]="user">
<a (click)="toggleListView()" class="action-link clickable"><i class="fas fa-toggle-{{ sortPref.listView ? 'on': 'off' }}"></i> List View</a>
<a (click)="canRefetchLibrary && !fetchLoading ? fetchLibrary() : null" [ngClass]="{ 'action-link clickable': canRefetchLibrary && !fetchLoading, 'grayed-out': !canRefetchLibrary || fetchLoading }"
[matTooltip]="canRefetchLibrary ? 'Re-fetch library now! This can be done once every 24 hours. Last fetched: ' + lastFetchDate.locale('en-US')?.fromNow() : 'You may refetch your Spotify libray every 24 hours. You can refetch your library in ' + moment.duration(nextFetchDate.diff(moment())).locale('en-US').humanize() + '.'"
[matTooltip]="canRefetchLibrary ? 'Re-fetch library now! This can be done once every 24 hours. Last fetched: ' + (lastFetchDate ? lastFetchDate.locale('en-US')?.fromNow() : 'never') : 'You may refetch your Spotify libray every 24 hours. You can refetch your library in ' + moment.duration(nextFetchDate.diff(moment())).locale('en-US').humanize() + '.'"
>
<i class="fas fa-sync-alt {{ fetchLoading ? 'fa-spin' : '' }}"></i> {{ !fetchLoading && !canRefetchLibrary ? 'Fetch Spotify Library (' + moment.duration(nextFetchDate.diff(moment())).humanize() + ')' : (canRefetchLibrary && !fetchLoading ? 'Fetch Spotify Library' : 'Fetching...') }}
</a>
Expand Down

0 comments on commit a4a0d82

Please sign in to comment.