Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#238 closed bug (fixed)

Seperate private and public $.extend

Reported by: anonymous Owned by:
Priority: major Milestone:
Component: core Version:
Keywords: Cc:
Blocked by: Blocking:


Using $.extend like this:

$.fn.myPlugin(options) {
  var settings = {
    // defaults
  $.extend(settings, options);

results in the jQuery object being extended when no options are passed. To simplify plugin writing, $.extend shouldn't do anything if the second parameter is null or undefined.

Changing this breaks code that already uses $.extend to extend jQuery itself.

Change History (1)

comment:1 Changed 16 years ago by john

Resolution: fixed
Status: newclosed

Fixed in SVN rev 441.

Note: See TracTickets for help on using tickets.