Skip to content

Commit

Permalink
added string includes polyfill
Browse files Browse the repository at this point in the history
fixed : #74
  • Loading branch information
shakee93 committed Dec 2, 2018
1 parent a3a2f8c commit e777299
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
17 changes: 17 additions & 0 deletions dist/vue-toasted.js

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

2 changes: 1 addition & 1 deletion dist/vue-toasted.min.js

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions src/js/show.js
Expand Up @@ -3,6 +3,24 @@ import animations from './animations'
import {toastObject} from './object'
const uuid = require('shortid');

// string includes polyfill
if (!String.prototype.includes) {
Object.defineProperty(String.prototype, 'includes', {
value: function(search, start) {
if (typeof start !== 'number') {
start = 0
}

if (start + search.length > this.length) {
return false
} else {
return this.indexOf(search, start) !== -1
}
}
})
}


let _options = {};
let _instance = null;
/**
Expand Down

0 comments on commit e777299

Please sign in to comment.