Skip to content

Commit

Permalink
Fix initialization issue
Browse files Browse the repository at this point in the history
Make sure shariff element does not have any children on initialization.
This fixes #47.
pmb0 committed Apr 8, 2015
1 parent 31ba614 commit f486631
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v1.9.2 2015-04-08
* Made sure shariff element does not have any children on initialization.

## v1.9.1 2015-04-08
* Fixed bower integration.

3 changes: 3 additions & 0 deletions src/js/shariff.js
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ var Shariff = function(element, options) {
// the DOM element that will contain the buttons
this.element = element;

// Ensure elemnt is empty
$(element).empty();

this.options = $.extend({}, this.defaults, options, $(element).data());

// available services. /!\ Browserify can't require dynamically by now.

0 comments on commit f486631

Please sign in to comment.