File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ export default {
61
61
developer: {}
62
62
};
63
63
},
64
- created () {
65
- this .getDeveloper ();
66
- },
67
64
filters: {
68
65
parseEmoji (text ) {
69
66
if (! text) {
@@ -72,14 +69,19 @@ export default {
72
69
return emoji .emojify (text);
73
70
}
74
71
},
72
+ watch: {
73
+ repository: {
74
+ async handler () {
75
+ const username = this .repository .name .split (" /" )[0 ];
76
+ this .developer = await this .getDeveloperByUsername (username);
77
+ },
78
+ immediate: true
79
+ }
80
+ },
75
81
methods: {
76
82
... mapActions ({
77
83
getDeveloperByUsername: " Developers/getDeveloperByUsername"
78
- }),
79
- async getDeveloper () {
80
- const username = this .repository .name .split (" /" )[0 ];
81
- this .developer = await this .getDeveloperByUsername (username);
82
- }
84
+ })
83
85
}
84
86
};
85
87
</script >
You can’t perform that action at this time.
0 commit comments