diff --git a/dist/js/jquery.orgchart.js b/dist/js/jquery.orgchart.js index 2078a0a1..96a61d65 100644 --- a/dist/js/jquery.orgchart.js +++ b/dist/js/jquery.orgchart.js @@ -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 = $('
', { 'data': { 'options': this.options },