We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2905c01 + d60f786 commit 3ce6005Copy full SHA for 3ce6005
src/index.js
@@ -2,15 +2,14 @@ import {Toasted as T} from './js/toast';
2
import ToastComponent from './toast.vue';
3
4
const Toasted = {
5
- install: (Vue, options) => {
+ install(Vue, options) {
6
+ if (!options) {
7
+ options = {};
8
+ }
9
- if(!options) {
- options = {};
- }
10
-
11
- let Toast = new T(options)
12
- Vue.component('toasted', ToastComponent);
13
- Vue.toasted = Vue.prototype.$toasted = Toast;
+ const Toast = new T(options);
+ Vue.component('toasted', ToastComponent);
+ Vue.toasted = Vue.prototype.$toasted = Toast;
14
}
15
};
16
@@ -19,4 +18,4 @@ if (typeof window !== 'undefined' && window.Vue) {
19
18
window.Toasted = Toasted;
20
21
22
-export default Toasted
+export default Toasted
0 commit comments