function loadPageDataIntoEditor(collectionName) {

  var pageUrl = $('.fl-panel--preview__content').contents().get(0).location.href;
  var pagePath = pageUrl.split("#!")[1];
  var pageUrlData = "/data" + pagePath;

  $.ajax({
    url: pageUrlData,
    dataType: 'json',
    success: function (response) {
      makeEditSections(collectionName, response, pagePath);
      checkIfPageIsComplete();
    },
    error: function () {
      console.log('No page data returned');
      $('.fl-editor').val('');
    }
  });

  function checkIfPageIsComplete() {

    getCollection(collectionName,
      success = function (response) {
        var pageIsComplete = false;

        $.each(response.completeUris, function (i, item) {
          if (pagePath == item) {
            pageIsComplete == true;
          }
        });

        if (pageIsComplete) {
          $('.fl-panel--editor__nav__review').show();
        }
        else {
          $('.fl-panel--editor__nav__review').hide();
        }
      },
      error = function (response) {
        handleApiError(response)
      });
  }
}



function loadPageDataIntoEditor(collectionName){

  var pageurl = $('.fl-panel--preview__content').contents().get(0).location.href;
  var pageurldata = "/data" + pageurl.split("#!")[1];

  $.ajax({
    url: pageurldata,
    dataType: 'json',
    success: function(response) {
      makeEditSections(collectionName, response);
    },
    error: function() {
      console.log('No page data returned');
      $('.fl-editor').val('');
    }
  });
}



--- 
+++ 
@@ -1,45 +1,19 @@
-function loadPageDataIntoEditor(collectionName) {
+function loadPageDataIntoEditor(collectionName){
 
-  var pageUrl = $('.fl-panel--preview__content').contents().get(0).location.href;
-  var pagePath = pageUrl.split("#!")[1];
-  var pageUrlData = "/data" + pagePath;
+  var pageurl = $('.fl-panel--preview__content').contents().get(0).location.href;
+  var pageurldata = "/data" + pageurl.split("#!")[1];
 
   $.ajax({
-    url: pageUrlData,
+    url: pageurldata,
     dataType: 'json',
-    success: function (response) {
-      makeEditSections(collectionName, response, pagePath);
-      checkIfPageIsComplete();
+    success: function(response) {
+      makeEditSections(collectionName, response);
     },
-    error: function () {
+    error: function() {
       console.log('No page data returned');
       $('.fl-editor').val('');
     }
   });
-
-  function checkIfPageIsComplete() {
-
-    getCollection(collectionName,
-      success = function (response) {
-        var pageIsComplete = false;
-
-        $.each(response.completeUris, function (i, item) {
-          if (pagePath == item) {
-            pageIsComplete == true;
-          }
-        });
-
-        if (pageIsComplete) {
-          $('.fl-panel--editor__nav__review').show();
-        }
-        else {
-          $('.fl-panel--editor__nav__review').hide();
-        }
-      },
-      error = function (response) {
-        handleApiError(response)
-      });
-  }
 }
 
 
Attach click handler to submit for review button to call API.
