dalekjs / dalek

[unmaintained] DalekJS Base framework
MIT License
695 stars 63 forks source link

waitFor() does not work #32

Open ryanzec opened 10 years ago

ryanzec commented 10 years ago

waitFor() does not properly work however execute() does. Turning on the logging revealed that the args parameter was not an array and when I looked at the code I noticed this line is missing in the waitFor() action but not in the execute() action (which is why execute was working):

var args = [this.contextVars].concat(Array.prototype.slice.call(arguments, 1) || []);

I have fixed this locally and everything seems to be working now. I will submit a pull request that fixes this later tonight.

ryanzec commented 10 years ago

I think the code to set args in this method should actually be:

arg = args || [];

Since this methods allows takes args as a parameter (the code that is there now was taken from a method that does not take args as a parameter).

herkyl commented 9 years ago

Whats the state with this? WaitFor seems to be broken still