     origCreated = Form.created
     Form.created = ->
       origCreated?()
-      @settings = @data.settings ? {}
+      @settings = @data?.settings ? {}
       Form.setUpDocs(@)
       if Form.isReactive() then Form.setUpReactivity()
       @isSubmitting = false

    Form.setUpReactivity = (template) ->
      template = getTemplate(template)
      docs = Form.getDocs()
      doc = template.data.doc
      template.reactiveDoc = new ReactiveVar(doc)
      template.getReactiveDoc = Form.getReactiveDoc.bind(template)
      # If no docs exist, no reactive updates can occur on them.


      onError: (operation, error) ->
        template = getTemplate(@template)
        Logger.error(error.message)
        Logger.error('Form error', operation, error, template, {notify: false})
        onError = formArgs.onError ? formArgs.hooks?.onError
        onError?.apply(@, args)

      beginSubmit: ->
        template = getTemplate(@template)
