We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f488f0b commit 6b9f290Copy full SHA for 6b9f290
js/turtleactions/ToneActions.js
@@ -88,8 +88,10 @@ function setupToneActions(activity) {
88
activity.logo.phraseMaker._instrumentName = synth;
89
}
90
91
+ let pushed = false;
92
if (!tur.singer.instrumentNames.includes(synth)) {
93
tur.singer.instrumentNames.push(synth);
94
+ pushed = true;
95
activity.logo.synth.loadSynth(turtle, synth);
96
97
if (tur.singer.synthVolume[synth] === undefined) {
@@ -113,7 +115,9 @@ function setupToneActions(activity) {
113
115
114
116
const __listener = () => {
117
tur.inSetTimbre = false;
- tur.singer.instrumentNames.pop();
118
+ if (pushed) {
119
+ tur.singer.instrumentNames.pop();
120
+ }
121
};
122
123
activity.logo.setTurtleListener(turtle, listenerName, __listener);
0 commit comments