Skip to content

Commit

Permalink
fix: constructor name support for IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 authored Apr 7, 2018
1 parent e136096 commit 95614b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/MdAutocomplete/MdAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
this.showOptions()
}
if (this.searchTerm.constructor.name.toLowerCase() !== 'inputevent') {
if (this.searchTerm.constructor.toString().match(/function (\w*)/)[1].toLowerCase() !== 'inputevent') {
this.$emit('md-changed', this.searchTerm)
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/MdField/MdFieldMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
return this.localValue
},
set (value) {
if (value.constructor.name.toLowerCase() !== 'inputevent') {
if (value.constructor.toString().match(/function (\w*)/)[1].toLowerCase() !== 'inputevent') {
this.$nextTick(() => {
this.localValue = value
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/MdRipple/MdRipple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
watch: {
mdActive (active) {
const isBoolean = typeof active === 'boolean'
const isEvent = active.constructor.name.toLowerCase() === 'mouseevent'
const isEvent = active.constructor.toString().match(/function (\w*)/)[1].toLowerCase() === 'mouseevent'
if (isBoolean && this.mdCentered && active) {
this.startRipple({
Expand Down

0 comments on commit 95614b6

Please sign in to comment.