Skip to content

Commit b07cf61

Browse files
authored
Add files via upload
1 parent 99cf985 commit b07cf61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/turtle-singer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ class Singer {
668668
static setMasterVolume(logo, volume, blk) {
669669
const activity = logo.activity;
670670
const firstConnection = activity.logo.blockList[blk].connections[0];
671-
const lastConnection = activity.logo.blockList[blk].connections.slice(-1)[0] || null;
671+
const lastConnection = last(activity.logo.blockList[blk].connections);
672672
volume = Math.min(Math.max(volume, 0), 100);
673673
logo.synth.setMasterVolume(volume, firstConnection, lastConnection);
674674
for (const turtle of activity.turtles.turtleList) {

0 commit comments

Comments
 (0)