Skip to content

Commit

Permalink
Just refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Mar 28, 2019
1 parent d9ac39c commit d60f786
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 d60f786

Please sign in to comment.