Skip to content

Commit

Permalink
fix: Avoid initialize kudos api when accessing public site - MEED-6225
Browse files Browse the repository at this point in the history
…- Meeds-io/meeds#1905 (#478)

Before this change, errors were listed when accessing the public site
linked to the Kudos API
  • Loading branch information
AzmiTouil authored Apr 25, 2024
1 parent 29e7514 commit cfec22c
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,16 @@ export default {
}
},
created() {
this.init()
.then(() => {
if (this.disabled) {
return;
}
this.$refs.kudosAPI.init();
document.addEventListener('exo-kudos-open-send-modal', this.openDrawer);
});
if (eXo?.env?.portal?.userName) {
this.init()
.then(() => {
if (this.disabled) {
return;
}
this.$refs.kudosAPI.init();
document.addEventListener('exo-kudos-open-send-modal', this.openDrawer);
});
}
},
computed: {
searchOptions() {
Expand Down

0 comments on commit cfec22c

Please sign in to comment.