Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / big_pipe / js / big_pipe.js
index b8a25f77cc8987832ec660ba87dea22329419b83..e386191ac1b99fce7e188ecc06eb885c455b0703 100644 (file)
@@ -6,6 +6,18 @@
 **/
 
 (function ($, Drupal, drupalSettings) {
+  function mapTextContentToAjaxResponse(content) {
+    if (content === '') {
+      return false;
+    }
+
+    try {
+      return JSON.parse(content);
+    } catch (e) {
+      return false;
+    }
+  }
+
   function bigPipeProcessPlaceholderReplacement(index, placeholderReplacement) {
     var placeholderId = placeholderReplacement.getAttribute('data-big-pipe-replacement-for-placeholder-with-id');
     var content = this.textContent.trim();
     }
   }
 
-  function mapTextContentToAjaxResponse(content) {
-    if (content === '') {
-      return false;
-    }
+  var interval = drupalSettings.bigPipeInterval || 50;
 
-    try {
-      return JSON.parse(content);
-    } catch (e) {
-      return false;
-    }
-  }
+  var timeoutID = void 0;
 
   function bigPipeProcessDocument(context) {
     if (!context.querySelector('script[data-big-pipe-event="start"]')) {
     }, interval);
   }
 
-  var interval = drupalSettings.bigPipeInterval || 50;
-
-  var timeoutID = void 0;
-
   bigPipeProcess();
 
   $(window).on('load', function () {