Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This is reference counting code.
project.frameworks[src] -= (project.frameworks[src] || 1) - 1;
which expands to:
project.frameworks[src] = project.frameworks[src] - (project.frameworks[src] || 1) - 1;
project.frameworks[src] would contain a number, or undefined.
My guess is that the intent of this line is to decrement the reference count by 1. If the count was not set, the resulting count value should be negative, according to the next conditional "if (project.frameworks[src] < 1)
{" where it would delete the entry in the object. The correct line should be: {code}project.frameworks[src] = (project.frameworks[src] || 1) - 1;
Attachments
Issue Links
- is related to
-
CB-10361 frameworks.json not being updated properly
- Closed
- links to