Skip to content

Commit 70951e3

Browse files
committed
0.0.7
1 parent b9c4b92 commit 70951e3

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

dist/vue-highcharts.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ var ctors = {
1313
'highcharts-renderer': 'Renderer'
1414
};
1515

16+
/* istanbul ignore next */
17+
function clone(obj) {
18+
var copy;
19+
if (obj === null || typeof obj !== 'object') {
20+
return obj;
21+
}
22+
if (obj instanceof Array) {
23+
copy = [];
24+
for (var i = obj.length - 1; i >= 0; i--) {
25+
copy[i] = clone(obj[i]);
26+
}
27+
return copy;
28+
}
29+
if (obj instanceof Object) {
30+
copy = {};
31+
for (var key in obj) {
32+
copy[key] = clone(obj[key]);
33+
}
34+
return copy;
35+
}
36+
}
37+
1638
function create(tagName, Highcharts) {
1739
var Ctor = Highcharts[ctors[tagName]];
1840
if (!Ctor) {
@@ -43,11 +65,7 @@ function create(tagName, Highcharts) {
4365
this.renderer && this.$el.removeChild(this.renderer.box);
4466
this.renderer = new Ctor(this.$el, this.width, this.height);
4567
} else {
46-
var opts = {};
47-
for (var property in this.options) {
48-
opts[property] = this.options[property];
49-
}
50-
this.chart = new Ctor(this.$el, opts);
68+
this.chart = new Ctor(this.$el, clone(this.options));
5169
}
5270
}
5371
},

dist/vue-highcharts.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-highcharts",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "Highcharts component for Vue",
55
"main": "dist/vue-highcharts.js",
66
"jsnext:main": "src/index.js",

0 commit comments

Comments
 (0)