Skip to content

Commit

Permalink
Changed Peaks.init() to return undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Sep 8, 2024
1 parent 0b71bdc commit 3c3a090
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ Shows or hides the time axis timestamp labels.

The `options` object can be used to set the the height of the time axis markers on the top and bottom of the waveform.


The initial setting is controlled by the `showAxisLabels` configuration option
(default: `true`) and the `axisTopMarkerHeight` and `axisBottomMarkerHeight` options (default: 10).

Expand Down
1 change: 0 additions & 1 deletion peaks.js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,6 @@ declare module 'peaks.js' {
}

interface InstanceEvents {
'peaks.ready': () => void;
'points.add': (event: PointsAddEvent) => void;
'points.click': (event: PointClickEvent) => void;
'points.dblclick': (event: PointClickEvent) => void;
Expand Down
2 changes: 0 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,6 @@ Peaks.init = function(opts, callback) {
.catch(function(err) {
callback(err);
});

return instance;
};

Peaks.prototype._setOptions = function(opts) {
Expand Down
4 changes: 2 additions & 2 deletions test/api-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Peaks', function() {
});
});

it('should return the peaks instance', function(done) {
it('should return undefined', function(done) {
const result = Peaks.init({
overview: {
container: document.getElementById('overview-container')
Expand All @@ -81,7 +81,7 @@ describe('Peaks', function() {
function(err, instance) {
expect(err).to.equal(null);
expect(instance).to.be.an.instanceOf(Peaks);
expect(result).to.equal(instance);
expect(result).to.equal(undefined);
instance.destroy();
done();
});
Expand Down

0 comments on commit 3c3a090

Please sign in to comment.