Commit 20ce5807 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Add polyfill for phantomjs compatibility - #578 #838

parent e9fa81f8
......@@ -69,6 +69,7 @@ module.exports = (grunt) ->
'src/api.chart.js',
'src/api.tooltip.js',
'src/c3.axis.js',
'src/polyfill.js',
'src/tail.js'
]
dest: 'c3.js'
......
......@@ -6790,6 +6790,14 @@
return axis;
}
// fix problems using c3 with phantomjs #578
Function.prototype.bind = Function.prototype.bind || function (thisp) {
var fn = this;
return function () {
return fn.apply(thisp, arguments);
};
};
if (typeof define === 'function' && define.amd) {
define("c3", ["d3"], c3);
} else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment