Skip to content

Commit

Permalink
fix: deleting item when all feeds is selected causes ui crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nkanaev committed Feb 11, 2021
1 parent 68d2696 commit 9b93a95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ var vm = new Vue({
if (confirm('Are you sure you want to delete ' + feed.title + '?')) {
api.feeds.delete(feed.id).then(function() {
// unselect feed to prevent reading properties of null in template
var isSelected = (vm.feedSelected === 'feed:'+feed.id
var isSelected = !vm.feedSelected
|| (vm.feedSelected === 'feed:'+feed.id
|| (feed.folder_id && vm.feedSelected === 'folder:'+feed.folder_id));
if (isSelected) vm.feedSelected = null

Expand Down

0 comments on commit 9b93a95

Please sign in to comment.