Skip to content

Commit

Permalink
Merge pull request #17 from tutorcruncher/polyfill
Browse files Browse the repository at this point in the history
adding babel-polyfill
  • Loading branch information
samuelcolvin authored Mar 1, 2018
2 parents 9f68f02 + 34956fd commit e559e35
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tutorcruncher-socket",
"version": "1.3.1",
"version": "1.3.2",
"description": "TutorCruncher socket",
"author": "Samuel Colvin <[email protected]>",
"private": false,
Expand Down Expand Up @@ -34,6 +34,7 @@
]
},
"dependencies": {
"babel-polyfill": "^6.26.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"html-webpack-plugin": "^2.30.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/EnquiryForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class EnquiryForm extends Component {
return (
<div className="tcs-enquiry">
<IfElse v={this.state.submitted}>
<div className="tcs-submitted" v-if="submitted">
<div className="tcs-submitted">
<Markdown content={
get_text(this.mode.includes('modal') ? 'enquiry_modal_submitted_thanks' : 'enquiry_submitted_thanks')
}/>
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Raven from 'raven-js'
import React from 'react'
import ReactDOM from 'react-dom'
import 'babel-polyfill'
import './main.scss'
import App from './components/App'
import {BrowserRouter, HashRouter} from 'react-router-dom'
Expand Down Expand Up @@ -72,7 +73,7 @@ window.socket = async function (public_key, config) {
}

let error = null
if (config.mode && MODES.indexOf(config.mode) === -1) {
if (config.mode && !MODES.includes(config.mode)) {
error = `invalid mode "${config.mode}", options are: ${MODES.join(', ')}`
config.mode = 'grid'
}
Expand All @@ -97,7 +98,7 @@ window.socket = async function (public_key, config) {
if (config.mode === 'enquiry') {
config.router_mode = 'history'
}
} else if (ROUTER_MODES.indexOf(config.router_mode) === -1) {
} else if (!ROUTER_MODES.includes(config.router_mode)) {
error = `invalid router mode "${config.router_mode}", options are: ${ROUTER_MODES.join(', ')}`
config.router_mode = 'hash'
}
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-polyfill@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
dependencies:
babel-runtime "^6.26.0"
core-js "^2.5.0"
regenerator-runtime "^0.10.5"

[email protected]:
version "1.6.1"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
Expand Down Expand Up @@ -5849,6 +5857,10 @@ regenerate@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"

regenerator-runtime@^0.10.5:
version "0.10.5"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"

regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
Expand Down

0 comments on commit e559e35

Please sign in to comment.