Permalink
Browse files

Don't overwrite the prototype to preserve the constructor property.

Instead of restoring the property (as suggested in the pull request) this patch uses the existing `merge` function in order to reduce the file size. Fixes #61
  • Loading branch information...
1 parent 682d112 commit ee7b4d5abbf6fa801eb13b936ad25d8b3dcecdf3 @fgnass committed Mar 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 spin.js
View
@@ -144,7 +144,7 @@
};
Spinner.defaults = {};
- Spinner.prototype = {
+ merge(Spinner.prototype, {
spin: function(target) {
this.stop();
var self = this;
@@ -227,7 +227,7 @@
opacity: function(el, i, val) {
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val;
}
- };
+ });
/////////////////////////////////////////////////////////////////////////
// VML rendering for IE

0 comments on commit ee7b4d5

Please sign in to comment.