Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / misc / drupal.js
index 39a74e4f51863ef988be9b8bc987ae4b4798aa6a..4e3389358e14ddc3acc33c4220ad0cb1e80b9639 100644 (file)
@@ -135,12 +135,12 @@ window.Drupal = { behaviors: {}, locale: {} };
 
   Drupal.url.isLocal = function (url) {
     var absoluteUrl = Drupal.url.toAbsolute(url);
-    var protocol = location.protocol;
+    var protocol = window.location.protocol;
 
     if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
       protocol = 'https:';
     }
-    var baseUrl = protocol + '//' + location.host + drupalSettings.path.baseUrl.slice(0, -1);
+    var baseUrl = protocol + '//' + window.location.host + drupalSettings.path.baseUrl.slice(0, -1);
 
     try {
       absoluteUrl = decodeURIComponent(absoluteUrl);