1
0
mirror of https://github.com/kihashi/stardew_community_checklist.git synced 2025-10-19 08:03:17 +00:00

Added a special filter for seasons.

This commit is contained in:
John Cleaver 2016-04-13 23:49:23 -04:00
parent f9da987ba3
commit d6b46b5a38

14
main.js
View File

@ -176,3 +176,17 @@ Vue.filter('filterByArray', function(array1, array2){
}
});
});
Vue.filter('seasonFilter', function(items, season_id){
return items.filter(function(element){
if(season_id == "allseasons" && element.seasons.length > 3){
return true;
}
else if(element.seasons.length < 4 && element.seasons.indexOf(season_id) > -1){
return true;
}
else{
return false;
}
});
});