Skip to content

Commit

Permalink
feat: remove need for polyfill on ie11
Browse files Browse the repository at this point in the history
closes #168
  • Loading branch information
stasson committed Dec 29, 2017
1 parent 6f0acf1 commit e39f6b9
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"comments": true,
"plugins": [
"transform-object-assign",
"transform-object-rest-spread",
"syntax-dynamic-import"
],
Expand Down
2 changes: 1 addition & 1 deletion components/card/mdc-card-img.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
mult: {
type: [Number, String],
validator: function (value) {
return [1, 1.5, 2, 3].includes(Number(value))
return [1, 1.5, 2, 3].indexOf(Number(value)) !== -1
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion components/layout-grid/mdc-layout-cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
align: {
type: String,
validator: function (value) {
return ['top', 'bottom', 'middle'].includes(value)
return ['top', 'bottom', 'middle'].indexOf(value) !== -1
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion components/textfield/mdc-textfield.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
default: 'text',
validator: function (value) {
return ['text', 'email', 'search', 'password', 'tel', 'url']
.includes(value)
.indexOf(value) !== -1
}
},
'dense': Boolean,
Expand Down
6 changes: 3 additions & 3 deletions components/theme/mdc-theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export default {
classes () {
let classes = {}
if (this.color && THEME_COLORS.includes(this.color)) {
if (this.color && THEME_COLORS.indexOf(this.color) !== -1) {
classes[`mdc-theme--${this.color}`] = true
}
if (this.background && THEME_COLORS.includes(this.background)) {
if (this.background && THEME_COLORS.indexOf(this.background) !== -1) {
classes[`mdc-theme--${this.background}-bg`] = true
if (this.color && THEME_STYLES.includes(this.color)) {
if (this.color && THEME_STYLES.indexOf(this.color) !== -1) {
classes[`mdc-theme--${this.color}-on-${this.background}`] = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/typography/mdc-typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function mdcTypoPropMixin(defaultTag, defaultTypo, validTypos) {
'typo': {
type: String,
default: defaultTypo,
validator: (value) => validTypos.includes(value)
validator: (value) => validTypos.indexOf(value) !== -1
},
'adjust-margin': {
type: Boolean,
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"babel-loader": "^7.1.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-remove-strict-mode": "0.0.2",
"babel-polyfill": "^6.26.0",
Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const babelConfig = {
]
],
'plugins': [
"transform-object-assign",
"transform-object-rest-spread",
// let rollup bundle helpers once
// see https://github.com/rollup/rollup-plugin-babel#helpers
Expand Down

0 comments on commit e39f6b9

Please sign in to comment.