Skip to content

Commit

Permalink
Merge pull request #117 from kahirokunn/patch-1
Browse files Browse the repository at this point in the history
refactor index.js
  • Loading branch information
shakee93 committed May 17, 2019
2 parents 2905c01 + d60f786 commit 3ce6005
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/index.js
Expand Up @@ -2,15 +2,14 @@ import {Toasted as T} from './js/toast';
import ToastComponent from './toast.vue';

const Toasted = {
install: (Vue, options) => {
install(Vue, options) {
if (!options) {
options = {};
}

if(!options) {
options = {};
}

let Toast = new T(options)
Vue.component('toasted', ToastComponent);
Vue.toasted = Vue.prototype.$toasted = Toast;
const Toast = new T(options);
Vue.component('toasted', ToastComponent);
Vue.toasted = Vue.prototype.$toasted = Toast;
}
};

Expand All @@ -19,4 +18,4 @@ if (typeof window !== 'undefined' && window.Vue) {
window.Toasted = Toasted;
}

export default Toasted
export default Toasted

0 comments on commit 3ce6005

Please sign in to comment.