Permalink
Browse files

[js] construct preferences properly

Use empty object literal for the first argument so as to not modify the
defaults.
  • Loading branch information...
1 parent 7b10235 commit d99242ff7bed5764155f6ed7d3549a17e6e08530 @seliopou seliopou committed May 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/pageguide.js
View
@@ -55,7 +55,7 @@ $(function() {
});
tl.pg.PageGuide = function (pg_elem, preferences) {
- this.preferences = $.extend(tl.pg.default_prefs, preferences || {});
+ this.preferences = $.extend({}, tl.pg.default_prefs, preferences);
this.$base = pg_elem;
this.$all_items = $('#tlyPageGuide > li', this.$base);
this.$items = $([]); /* fill me with visible elements on pg expand */

0 comments on commit d99242f

Please sign in to comment.