Permalink
Browse files

The $.extend function caused troubles in an app of mine. Removing the…

… first (empty object) parameter hopefully fixed it.
  • Loading branch information...
1 parent 20a8d69 commit aa6084e65499f591b1d8bc9efef6342fa05407e5 @johanbrook committed May 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 zepto.pjax.js
View
@@ -53,7 +53,7 @@ $.fn.pjax = function( container, options ) {
clickedElement: $(this)
}
- $.pjax($.extend({}, defaults, options))
+ $.pjax($.extend(defaults, options))
event.preventDefault()
})

4 comments on commit aa6084e

@defunkt
defunkt commented on aa6084e Jun 5, 2011

Maybe a jQuery bug? This usage of $.extend is recommended in jQuery's docs:

From http://api.jquery.com/jQuery.extend/:

var object = $.extend({}, object1, object2);
@defunkt
defunkt commented on aa6084e Jun 5, 2011

Oh, zepto-pjax :) Ignore me.

@jimisaacs

Good catch, I would suggest putting an issue in with zepto if you haven't already.

@defunkt
defunkt commented on aa6084e Jun 8, 2011

Looks like someone beat me to it: madrobby/zepto#194

Please sign in to comment.