Hello,
Have a problem with fakebook and modern fakebook theme. On the right sidebar. This script should not load to logged out visitors. Is there any idea to load this script only the logged in users? Thank you 
<!-- Custom sidebar widget -->
<script type="text/discourse-plugin" version="0.8">
const ajax = require('discourse/lib/ajax').ajax;
let currentUser = Discourse.User.currentProp('username');
api.registerConnectorClass('discovery-below', 'sidebar', {
setupComponent(args, component) {
ajax("/u/" + currentUser + "/summary.json").then (function(result){
stinkinBadges = [];
userLikesReceived = result.user_summary.likes_received;
userLikesGiven = result.user_summary.likes_given;
result.badges.forEach(function(badges){
stinkinBadges.push(badges);
});
component.set('userLikesReceived', userLikesReceived);
component.set('userLikesGiven', userLikesGiven);
component.set('stinkinBadges', stinkinBadges);
component.set('userName', api.getCurrentUser().name);
component.set('user', api.getCurrentUser().username);
});
}
});
</script>
The error code is:
