From d5a5756e708dc71323c3bcdb02f8f2645af81da4 Mon Sep 17 00:00:00 2001 From: Glen Schrader Date: Tue, 11 Oct 2016 16:22:27 -0600 Subject: [PATCH] add babel-polyfill in order to add Object.assign and Array.includes support for older browsers (#1302) --- caravel/assets/javascripts/dashboard/Dashboard.jsx | 1 + caravel/assets/javascripts/explore/explore.jsx | 1 + caravel/assets/javascripts/standalone.js | 1 + caravel/assets/package.json | 1 + 4 files changed, 4 insertions(+) diff --git a/caravel/assets/javascripts/dashboard/Dashboard.jsx b/caravel/assets/javascripts/dashboard/Dashboard.jsx index 72d9187902f76..4b4c540cc94e1 100644 --- a/caravel/assets/javascripts/dashboard/Dashboard.jsx +++ b/caravel/assets/javascripts/dashboard/Dashboard.jsx @@ -1,3 +1,4 @@ +require('babel-polyfill'); const $ = window.$ = require('jquery'); const jQuery = window.jQuery = require('jquery'); // eslint-disable-line const px = require('../modules/caravel.js'); diff --git a/caravel/assets/javascripts/explore/explore.jsx b/caravel/assets/javascripts/explore/explore.jsx index 79aff8fe3b902..8b243954f4705 100644 --- a/caravel/assets/javascripts/explore/explore.jsx +++ b/caravel/assets/javascripts/explore/explore.jsx @@ -3,6 +3,7 @@ // nb: to add a new vis, you must also add a Python fn in viz.py // // js +require('babel-polyfill'); const $ = window.$ = require('jquery'); const px = require('./../modules/caravel.js'); const showModal = require('./../modules/utils.js').showModal; diff --git a/caravel/assets/javascripts/standalone.js b/caravel/assets/javascripts/standalone.js index e0e8f9c27b348..01121b71d7cdc 100644 --- a/caravel/assets/javascripts/standalone.js +++ b/caravel/assets/javascripts/standalone.js @@ -1,3 +1,4 @@ +require('babel-polyfill'); const $ = window.$ = require('jquery'); /* eslint no-unused-vars: 0 */ const jQuery = window.jQuery = $; diff --git a/caravel/assets/package.json b/caravel/assets/package.json index 82cd0025e4a16..b83c8a4e3bc45 100644 --- a/caravel/assets/package.json +++ b/caravel/assets/package.json @@ -90,6 +90,7 @@ "babel": "^6.3.26", "babel-core": "^6.10.4", "babel-loader": "^6.2.4", + "babel-polyfill": "^6.16.0", "babel-preset-airbnb": "^2.0.0", "babel-preset-react": "^6.11.1", "chai": "^3.5.0",