Commit cc02eb70 authored by KR Moorhouse's avatar KR Moorhouse Committed by GitHub

Merge pull request #3103 from wpninjas/issue#3099

Add check for localized form data.
parents 0167df1d 80210d3d
......@@ -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.
This diff is collapsed.
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