Skip to content

Commit

Permalink
0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhenye committed May 1, 2017
1 parent e1eaa05 commit 3abc4e2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions dist/vue-highcharts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('highcharts')) :
typeof define === 'function' && define.amd ? define(['highcharts'], factory) :
(global.VueHighcharts = factory(global.Highcharts));
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('highcharts')) :
typeof define === 'function' && define.amd ? define(['highcharts'], factory) :
(global.VueHighcharts = factory(global.Highcharts));
}(this, (function (HighchartsOnly) { 'use strict';

HighchartsOnly = 'default' in HighchartsOnly ? HighchartsOnly['default'] : HighchartsOnly;
Expand Down Expand Up @@ -35,10 +35,19 @@ function clone(obj) {
}
}

function render(createElement) {
return createElement('div');
}

function create(tagName, Highcharts, Vue) {
var Ctor = Highcharts[ctors[tagName]];
if (!Ctor) {
return null;
return Highcharts.win
? null
// When running in server, Highcharts will not be instanced,
// so there're no constructors in Highcharts,
// to avoid unmated content during SSR, it returns minimum component.
: { render: render };
}
var isRenderer = tagName === 'highcharts-renderer';
var component = {
Expand Down Expand Up @@ -87,9 +96,7 @@ function create(tagName, Highcharts, Vue) {
this._initChart();
};
} else {
component.render = function(createElement) {
return createElement('div');
};
component.render = render;
component.mounted = function() {
this._initChart();
};
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-highcharts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-highcharts",
"version": "0.0.9",
"version": "0.0.10",
"description": "Highcharts component for Vue",
"main": "dist/vue-highcharts.js",
"module": "src/index.js",
Expand Down

0 comments on commit 3abc4e2

Please sign in to comment.