Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
start/stop only takes one argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkaron committed Mar 15, 2013
1 parent 8004bc4 commit 383ca57
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/weave.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ define([ "jquery", "troopjs-utils/getargs", "require", "./destroy" ], function W
// Create deferredStart
var deferredStart = $.Deferred();

var start_args = [ deferredStart ];

ARRAY_PUSH.apply(start_args, weave_args);

// Link deferredWeave and deferredStart
deferredStart.then(function started() {
deferredWeave.resolve(widget);
Expand All @@ -153,7 +149,7 @@ define([ "jquery", "troopjs-utils/getargs", "require", "./destroy" ], function W
promise[WOVEN] = widget.toString();

// Start
widget.start.apply(widget, start_args);
widget.start(deferredStart);
}
catch (e) {
// Reject deferredStart
Expand Down Expand Up @@ -293,18 +289,14 @@ define([ "jquery", "troopjs-utils/getargs", "require", "./destroy" ], function W
// Create deferredStop
var deferredStop = $.Deferred();

var stop_args = [ deferredStop ];

ARRAY_PUSH.apply(stop_args, unweave_args);

// Link deferredUnweave and deferredStop
deferredStop.then(function stopped() {
deferredUnweave.resolve(widget);
}, deferredUnweave.reject, deferredUnweave.notify);

try {
// Stop
widget.stop.apply(widget, stop_args);
widget.stop(deferredStop);
}
catch (e) {
// Reject deferredStart
Expand Down

0 comments on commit 383ca57

Please sign in to comment.