       .then -> ensureCustomer(store)
       .then -> ensureSubscription(store)
 
-  promise.then(console.log.bind(console, 'finished dispactching initial actions'))
+  promise.then(console.log.bind(console, 'finished dispatching initial actions'))
 
 

# if there is no payment information for that group, just create one
ensureCustomer = ({ dispatch, getState }) ->

  { _id } = globals.currentGroup

  group = bongo.byId('JGroup', _id)(getState())

  if group.payment
  then dispatch(loadCustomer())


ensureSubscription = ({ dispatch, getState }) ->

  { currentGroup: group } = globals

  state = getState()

  if group.payment?.subscription
  then dispatch(loadSubscription())
