Closed Bug 961553 Opened 11 years ago Closed 11 years ago

Possible dead code on project name setting

Categories

(Webmaker Graveyard :: Popcorn Maker, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: thecount, Assigned: thecount)

Details

Attachments

(1 file)

We have a block of code like this: if ( butter.project.name && ( butter.project.id || butter.project.isRemix || butter.project.isBackup ) ) { _projectName.textContent = butter.project.name; } I am questioning why we need all these checks. In what case do we have a name, but don't want to use it? According to the above logic, if we have a name, but we don't have an id, or are a remix, or are a backup. I cannot find a case where we have a name that we don't want to use, and all the above checks are false. Seems this is the commit for it: https://github.com/mozilla/popcorn.webmaker.org/commit/ac995db87e45fa35a1ed9b1b0295f180a9d3c941#diff-85acba044c90be814d446d2c6be9de45R423 I just want to go back to what it was, if we can. If we have a name, use it, if we have a name and we cannot use it, we have another problem as to why do we have a name?
Assignee: nobody → scott
So, I'm not just trying to remove code for code removal sake, but I'm trying to reduce the number of states the app can be in. If we don't need some weird check for name, we don't need to worry if we're a backup or not, and thus don't need to store that data. A backup should just be data loaded, and once loaded, it is simply a project. Putting aali on this because of the initial commit, and Matt because of the addition of isBackup.
Attachment #8362303 - Flags: review?(schranz.m)
Attachment #8362303 - Flags: review?(ali)
Attachment #8362303 - Flags: review?(schranz.m) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(scott)
Resolution: --- → FIXED
Attachment #8362303 - Flags: review?(ali) → review+
Status: RESOLVED → VERIFIED
Flags: needinfo?(scott)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: