Bladeren bron

added Object.assign polyfill

Piotr Labudda 9 jaren geleden
bovenliggende
commit
c738aca78e
1 gewijzigde bestanden met toevoegingen van 26 en 0 verwijderingen
  1. 26 0
      SE/se-lib/tmpl/_layout_gora.php

+ 26 - 0
SE/se-lib/tmpl/_layout_gora.php

@@ -118,6 +118,32 @@ body { <?php echo UI::fixFooterPosition('body_style'); ?> }
 		</script>
 	<?php endif; ?>
 <script>
+if (typeof Object.assign != 'function') {
+	(function () {
+	  Object.assign = function (target) {
+	    'use strict';
+	    // We must check against these specific cases.
+	    if (target === undefined || target === null) {
+	      throw new TypeError('Cannot convert undefined or null to object');
+	    }
+
+	    var output = Object(target);
+	    for (var index = 1; index < arguments.length; index++) {
+	      var source = arguments[index];
+	      if (source !== undefined && source !== null) {
+	        for (var nextKey in source) {
+	          if (source.hasOwnProperty(nextKey)) {
+	            output[nextKey] = source[nextKey];
+	          }
+	        }
+	      }
+	    }
+	    return output;
+	  };
+	})();
+}
+</script>
+<script>
 function p5UI__Clickable(n, eventNamespace, props) {
 	var dbg = <?php echo (DBG::isActive())? 1 : 0; ?>;
 	var eventNamespace = eventNamespace || 'p5UI__Clickable';