Commit 6e6b881d authored by kjohnson's avatar kjohnson

add check for localized form data. Closes #3099.

parent 0b2b95f4
......@@ -49,4 +49,4 @@ define(['models/formModel', 'models/formCollection', 'models/fieldCollection', '
});
return controller;
} );
\ No newline at end of file
} );
......@@ -38,6 +38,15 @@
jQuery( document ).ready( function( $ ) {
require( [ 'models/formCollection', 'models/formModel', 'models/fieldCollection', 'controllers/loadControllers', 'views/mainLayout'], function( formCollection, FormModel, FieldCollection, LoadControllers, mainLayout ) {
if( 'undefined' == typeof nfForms ) {
/*
* nfForms is not defined. This means that something went wrong loading the form data.
* Bail form setup and empty the form containers to remove any loading animations.
*/
jQuery( '.nf-form-cont' ).empty();
return;
}
var NinjaForms = Marionette.Application.extend({
forms: {},
initialize: function( options ) {
......@@ -130,4 +139,4 @@ jQuery( document ).ready( function( $ ) {
var ninjaForms = new NinjaForms();
ninjaForms.start();
} );
} );
\ No newline at end of file
} );
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment