Skip to content

Commit 9092070

Browse files
(Gsoc'21)🔨corrected looper.js that fixes Score
1 parent ecf049e commit 9092070

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/looper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,12 @@ class Score {
387387
constructor() {
388388
// for all of the arguments
389389
this.parts = [];
390-
this.currentPart = new Array(arguments.length);
390+
this.currentPart = 0;
391391

392392
var thisScore = this;
393393
for (var i in arguments) {
394394
this.parts[i] = arguments[i];
395-
this.parts[i].nextPart = this.parts[i + 1];
395+
if (i > 0) this.parts[i - 1].nextPart = this.parts[i];
396396
this.parts[i].onended = function () {
397397
thisScore.resetPart(i);
398398
playNextPart(thisScore);

0 commit comments

Comments
 (0)