aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/javascript/helpers/polyfills.js1
-rw-r--r--app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js3
-rw-r--r--package.json2
-rw-r--r--yarn.lock2
4 files changed, 5 insertions, 3 deletions
diff --git a/app/javascript/helpers/polyfills.js b/app/javascript/helpers/polyfills.js
index 93e3e9846..691fe04af 100644
--- a/app/javascript/helpers/polyfills.js
+++ b/app/javascript/helpers/polyfills.js
@@ -1,4 +1,5 @@
import 'promise-polyfill/src/polyfill'
import 'es6-symbol/implement'
import 'polyfill-array-includes'
+import 'babel-polyfill'
import 'whatwg-fetch'
diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
index cec39ab4e..a0438d7c5 100644
--- a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
+++ b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js
@@ -58,7 +58,8 @@ export default class BSelect4 extends Component {
this.props.onSelect2JourneyPattern(e)
}
else{
- let data = JSON.parse(e.currentTarget.selectedOptions[0].dataset.item)
+ let option = e.currentTarget.options[e.currentTarget.selectedIndex]
+ let data = JSON.parse(option.dataset.item)
this.props.onSelect2JourneyPattern({params:
{
diff --git a/package.json b/package.json
index 2967ad3d3..df48d5209 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"dependencies": {
"@rails/webpacker": "3.2.0",
"babel-jest": "22.0.4",
- "babel-polyfill": "6.26.0",
+ "babel-polyfill": "^6.26.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babelify": "8.0.0",
diff --git a/yarn.lock b/yarn.lock
index 6feabab48..2ee80613f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -791,7 +791,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-polyfill@6.26.0, babel-polyfill@^6.26.0:
+babel-polyfill@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
dependencies: