Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
fix(build): fix generated lib for IE<=10
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSharpieOne committed Nov 4, 2016
1 parent fb974e2 commit 75278b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"presets": ["es2015-loose", "stage-0", "react"],
"plugins": ["transform-runtime", "transform-proto-to-assign", "transform-class-properties"],
"env": {
"test": {
"plugins": [
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "availity-reactstrap-validation",
"version": "1.3.1",
"version": "1.3.2",
"author": "Evan Sharp <evan.sharp@availity.com>",
"description": "Form validation helpers for reactstrap",
"main": "lib/index.js",
Expand Down Expand Up @@ -76,6 +76,9 @@
"babel-eslint": "^6.1.2",
"babel-loader": "^6.2.5",
"babel-plugin-istanbul": "^1.1.0",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-proto-to-assign": "^6.9.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.13.0",
"babel-preset-es2015": "^6.13.2",
"babel-preset-es2015-loose": "^7.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/AvBaseInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default class AvBaseInput extends Component {

getValidatorProps() {
const state = this.props.state && this.context.FormCtrl.getInputState(this.props.name);
const htmlValAttrs = Object.keys(this.props.validate)
const htmlValAttrs = Object.keys(this.props.validate || {})
.filter(val => htmlValidationAttrs.indexOf(val) > -1)
.reduce((result, item) => {
result[item] = this.props.validate[item].value || this.props.validate[item];
Expand Down Expand Up @@ -226,7 +226,7 @@ export default class AvBaseInput extends Component {
}
});

this.context.FormCtrl.register(this);
this.context.FormCtrl && this.context.FormCtrl.register(this);
this.validate();
}
}
2 changes: 2 additions & 0 deletions src/AvInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export default class AvInput extends AvBaseInput {
tag: Input,
});

static contextTypes = AvBaseInput.contextTypes;

render() {
const {
errorMessage: omit1,
Expand Down

0 comments on commit 75278b6

Please sign in to comment.