Skip to content

Commit 2fcf887

Browse files
committed
remove redundant check
1 parent fd79b02 commit 2fcf887

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

js/logo.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4515,24 +4515,22 @@ function Logo () {
45154515
}
45164516

45174517
if (that.pitchTimeMatrix.rowLabels.length > 0) {
4518-
if (that.pitchTimeMatrix.rowLabels.length > 0) {
4519-
if (last(that.pitchTimeMatrix.rowLabels) === 'hertz') {
4520-
var freq = pitchToFrequency(noteObj[0], noteObj[1], 0, that.keySignature[turtle]);
4521-
that.pitchTimeMatrix.rowLabels.push('hertz');
4522-
that.pitchTimeMatrix.rowArgs.push(parseInt(freq));
4518+
if (last(that.pitchTimeMatrix.rowLabels) === 'hertz') {
4519+
var freq = pitchToFrequency(noteObj[0], noteObj[1], 0, that.keySignature[turtle]);
4520+
that.pitchTimeMatrix.rowLabels.push('hertz');
4521+
that.pitchTimeMatrix.rowArgs.push(parseInt(freq));
4522+
} else {
4523+
if (SOLFEGENAMES1.indexOf(last(that.pitchTimeMatrix.rowLabels)) !== -1) {
4524+
that.pitchTimeMatrix.rowLabels.push(SOLFEGECONVERSIONTABLE[noteObj1[0]]);
45234525
} else {
4524-
if (SOLFEGENAMES1.indexOf(last(that.pitchTimeMatrix.rowLabels)) !== -1) {
4525-
that.pitchTimeMatrix.rowLabels.push(SOLFEGECONVERSIONTABLE[noteObj1[0]]);
4526-
} else {
4527-
that.pitchTimeMatrix.rowLabels.push(noteObj1[0]);
4528-
}
4529-
4530-
that.pitchTimeMatrix.rowArgs.push(noteObj1[1]);
4526+
that.pitchTimeMatrix.rowLabels.push(noteObj1[0]);
45314527
}
4532-
} else {
4533-
that.pitchTimeMatrix.rowLabels.push(noteObj1[0]);
4534-
that.pitchTimeMatrix.rowArgs.push(noteObj1[1]);
4535-
}
4528+
4529+
that.pitchTimeMatrix.rowArgs.push(noteObj1[1]);
4530+
}
4531+
} else {
4532+
that.pitchTimeMatrix.rowLabels.push(noteObj1[0]);
4533+
that.pitchTimeMatrix.rowArgs.push(noteObj1[1]);
45364534
}
45374535

45384536
that.previousNotePlayed[turtle] = that.lastNotePlayed[turtle];

0 commit comments

Comments
 (0)