Skip to content

Commit 3abc4e2

Browse files
committed
0.0.10
1 parent e1eaa05 commit 3abc4e2

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

dist/vue-highcharts.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(function (global, factory) {
2-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('highcharts')) :
3-
typeof define === 'function' && define.amd ? define(['highcharts'], factory) :
4-
(global.VueHighcharts = factory(global.Highcharts));
2+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('highcharts')) :
3+
typeof define === 'function' && define.amd ? define(['highcharts'], factory) :
4+
(global.VueHighcharts = factory(global.Highcharts));
55
}(this, (function (HighchartsOnly) { 'use strict';
66

77
HighchartsOnly = 'default' in HighchartsOnly ? HighchartsOnly['default'] : HighchartsOnly;
@@ -35,10 +35,19 @@ function clone(obj) {
3535
}
3636
}
3737

38+
function render(createElement) {
39+
return createElement('div');
40+
}
41+
3842
function create(tagName, Highcharts, Vue) {
3943
var Ctor = Highcharts[ctors[tagName]];
4044
if (!Ctor) {
41-
return null;
45+
return Highcharts.win
46+
? null
47+
// When running in server, Highcharts will not be instanced,
48+
// so there're no constructors in Highcharts,
49+
// to avoid unmated content during SSR, it returns minimum component.
50+
: { render: render };
4251
}
4352
var isRenderer = tagName === 'highcharts-renderer';
4453
var component = {
@@ -87,9 +96,7 @@ function create(tagName, Highcharts, Vue) {
8796
this._initChart();
8897
};
8998
} else {
90-
component.render = function(createElement) {
91-
return createElement('div');
92-
};
99+
component.render = render;
93100
component.mounted = function() {
94101
this._initChart();
95102
};

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.9",
3+
"version": "0.0.10",
44
"description": "Highcharts component for Vue",
55
"main": "dist/vue-highcharts.js",
66
"module": "src/index.js",

0 commit comments

Comments
 (0)