Skip to content

Commit 3c3a090

Browse files
committed
Changed Peaks.init() to return undefined
1 parent 0b71bdc commit 3c3a090

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

doc/API.md

-1
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,6 @@ Shows or hides the time axis timestamp labels.
889889

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

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

peaks.js.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ declare module 'peaks.js' {
426426
}
427427

428428
interface InstanceEvents {
429-
'peaks.ready': () => void;
430429
'points.add': (event: PointsAddEvent) => void;
431430
'points.click': (event: PointClickEvent) => void;
432431
'points.dblclick': (event: PointClickEvent) => void;

src/main.js

-2
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,6 @@ Peaks.init = function(opts, callback) {
446446
.catch(function(err) {
447447
callback(err);
448448
});
449-
450-
return instance;
451449
};
452450

453451
Peaks.prototype._setOptions = function(opts) {

test/api-spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('Peaks', function() {
6767
});
6868
});
6969

70-
it('should return the peaks instance', function(done) {
70+
it('should return undefined', function(done) {
7171
const result = Peaks.init({
7272
overview: {
7373
container: document.getElementById('overview-container')
@@ -81,7 +81,7 @@ describe('Peaks', function() {
8181
function(err, instance) {
8282
expect(err).to.equal(null);
8383
expect(instance).to.be.an.instanceOf(Peaks);
84-
expect(result).to.equal(instance);
84+
expect(result).to.equal(undefined);
8585
instance.destroy();
8686
done();
8787
});

0 commit comments

Comments
 (0)