Fixed error on no meteor.settings file, updated meteor

This commit is contained in:
Stefan Zermatten
2019-05-03 13:41:49 +02:00
parent 5ce1b6aff8
commit d4864dda5f
4 changed files with 17 additions and 14 deletions

View File

@@ -1,6 +1,8 @@
import { format as formatUrl } from 'url';
const CLIENT_ID = Meteor.settings.public.patreon.clientId;
const CLIENT_ID = Meteor.settings &&
Meteor.settings.public.patreon &&
Meteor.settings.public.patreon.clientId;
Template.profile.onCreated(function(){
this.showApiKey = new ReactiveVar(false);
@@ -18,6 +20,7 @@ Template.profile.helpers({
return Template.instance().showApiKey.get();
},
patreonLoginUrl: function(){
if (!CLIENT_ID) return;
return formatUrl({
protocol: 'https',
host: 'patreon.com',