Skip to content

Commit

Permalink
Fix scripts with incorrect counts and only one
Browse files Browse the repository at this point in the history
NOTE:
* Don't fully understand sizzle logic here with rating but this fixes `Size` and keeps the `Rating` at last known value until another script is added. `bongacams` has only `1` but never gets updated from `2`. Presume there is more. will have to go through them all again.

Applies to OpenUserJS#93
  • Loading branch information
Martii committed Feb 5, 2019
1 parent ffa194b commit 61f3e0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/modelParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,10 @@ var parseGroup = function (aGroup) {
group.rating = getRating(aScripts);
}

if (aScripts && aScripts.length === 1) {
group.size = aScripts.length;
}

if (aScripts && aScripts.length === 0) {
group.remove(function (aErr, aGroup) {
if (aErr) {
Expand Down

0 comments on commit 61f3e0f

Please sign in to comment.