Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug in .waterfall() #71

Closed
debonet opened this issue Dec 5, 2011 · 2 comments
Closed

minor bug in .waterfall() #71

debonet opened this issue Dec 5, 2011 · 2 comments

Comments

@debonet
Copy link

debonet commented Dec 5, 2011

Function reads:

async.waterfall = function (tasks, callback) {
    if (!tasks.length) {
        return callback();
    }
    callback = callback || function () {};
    ....

should be:

async.waterfall = function (tasks, callback) {
    callback = callback || function () {};
    if (!tasks.length) {
        return callback();
    }
    ....

Just in case the tasks are empty and the callback is null

Better yet, you could check to make sure tasks is defined as well:

async.waterfall = function (tasks, callback) {
    callback = callback || function () {};
    if (!tasks || !tasks.length) {
        return callback();
    }
    ....
@Sheile
Copy link
Contributor

Sheile commented Dec 6, 2011

Part of this ticket is duplicate #48 / 949e9e1

@caolan caolan closed this as completed Mar 28, 2014
@alizbazar
Copy link

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:

alizbazar@gmail.com
Domain alizweb.com has exceeded the max emails per hour (127/120 (105%)) allowed. Message will be reattempted later

------- This is a copy of the message, including all the headers. ------
Received: from o6.sgmail.github.com ([192.254.113.101]:15837)
by web107.webhotelli.fi with smtp (Exim 4.82)
(envelope-from bounces+848413-6825-alizbazar=alizweb.com@sgmail.github.com)
id 1WTaN6-0003Ya-VI
for alizbazar@alizweb.com; Fri, 28 Mar 2014 19:15:13 +0200
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sgmail.github.com;
h=from:reply-to:to:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=smtpapi; bh=6b7CCDaXYEdEHv+92bAydCpzexE=; b=p/aM6if7ZD3Bohyrxl
BJgshDeG9+tTcoNPa2jolkO61/z7anuMj/25+pLR6HFjsTK1jUdF6/d71t4Geh66
LE3CoU6iSbs3slwTK+FnDNLpZSo8xIqg7zKnhLeR6XW+t2/ibdDerNILWEw4jK2I
7mnJ1o4rPPilIQ6BiXorcVvik=
Received: by mf184.sendgrid.net with SMTP id mf184.13744.5335AE1E15
Fri, 28 Mar 2014 17:15:10 +0000 (UTC)
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [192.30.253.16])
by ismtpd-007 (SG) with ESMTP id 14509b0285a.15f0.8ceb6b
for alizbazar@alizweb.com; Fri, 28 Mar 2014 17:15:10 +0000 (GMT)
Date: Fri, 28 Mar 2014 10:15:10 -0700
From: Caolan McMahon notifications@github.com
Reply-To: caolan/async reply@reply.github.com
To: caolan/async async@noreply.github.com
Message-ID: caolan/async/issue/71/issue_event/106554000@github.com
In-Reply-To: caolan/async/issues/71@github.com
References: caolan/async/issues/71@github.com
Subject: Re: [async] minor bug in .waterfall() (#71)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5335ae1eb7604_5d963faee58212b0164446";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Recipient: alizbazar
List-ID: caolan/async <async.caolan.github.com>
List-Archive: https://github.com/caolan/async
List-Post: mailto:reply@reply.github.com
List-Unsubscribe: mailto:unsub+i-2445570-255ae3dc646ca084ecb31ff96c6899829f8efa4d-736771@reply.github.com,
https://github.com/notifications/unsubscribe/736771__eyJzY29wZSI6Ik5ld3NpZXM6TXV0ZSIsImV4cGlyZXMiOjE3MTE2NDYxMTAsImRhdGEiOnsiaWQiOjI4NzgzMTIwfX0=--4032ff05c5a32644b7a202d768165095c9812ae8
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: alizbazar@alizweb.com
X-SG-EID: 5rfIfHKDtPgyesnn+oI6KEolssHw4+3gNZWDqeE2Y56HbWrm1sCtU9V98AwWzt9keYOQDdZvBG0ujgvXbipx8R2Y8RjziUOj08gYfWqwN7S8yEmZ+cN21YNqFfOiS9lbhRiy9plDj6DMigCvTlH2PabNhqE/NqmgJMkN48z5Qq0=

----==_mimepart_5335ae1eb7604_5d963faee58212b0164446
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Closed #71.


Reply to this email directly or view it on GitHub:
#71
----==_mimepart_5335ae1eb7604_5d963faee58212b0164446
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit

Closed #71.


Reply to this email directly or view it on GitHub.

----==_mimepart_5335ae1eb7604_5d963faee58212b0164446--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants