Permalink
Browse files

rubber-underpants chord.identify

  • Loading branch information...
mattcarpenter committed Nov 24, 2017
1 parent 9bb6648 commit 168187cf53b1d366da7f97e68870fda7647a6a16
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/chord.js
  2. +1 −0 test/chord.test.js
View
@@ -351,7 +351,7 @@ var identify = function () {
});
// Use reasonable result, default to root position
var chord = reasonable ? reasonable.symbol : results[0].symbol;
var chord = reasonable ? reasonable.symbol : (results[0] || {}).symbol;
return chord;
};
View
@@ -261,6 +261,7 @@ describe('Chord', function () {
describe('#identifyArray', function () {
it('should identify a chord given an array', function () {
assert.equal(chord.identifyArray(['C', 'E', 'G']), 'C');
assert.equal(chord.identifyArray([], undefined));
});
});

0 comments on commit 168187c

Please sign in to comment.