Skip to main content

Bug Tracker

Side navigation

#14378 closed feature (notabug)

Opened September 20, 2013 12:55PM UTC

Closed September 20, 2013 01:42PM UTC

Have $.noop return a resolved promise

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

$.noop = function () {

var dfd = $.Deferred();

dfd.resolve();

return dfd.promise();

};

Could be helpfull if you're asked to pass a function to pipe that needs to be "pipable" itself. But maybe it would add too much overhead.

What do you think?

Attachments (0)
Change History (1)

Changed September 20, 2013 01:42PM UTC by jaubourg comment:1

resolution: → notabug
status: newclosed

You should simply use $.when() to get a promise resolved with no argument.