Skip to content

Commit

Permalink
fix the bug of init method
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeng committed Jul 7, 2017
1 parent 17cf603 commit dc5787a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/js/jquery.orgchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
this.options = $.extend({}, this.defaultOptions, this.opts, this.dataOpts, opts);
// build the org-chart
var $chartContainer = this.$chartContainer;
if ($chartContainer.children().length) {
$chartContainer.empty();
}
var data = this.options.data;
var $chart = this.$chart = $('<div>', {
'data': { 'options': this.options },
Expand Down

0 comments on commit dc5787a

Please sign in to comment.