summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-01-06 16:37:05 +0100
committerJo-Philipp Wich <jo@mein.io>2019-07-07 15:25:49 +0200
commit53e20c4925f9f3429c46ffd31efd3442af1e1c03 (patch)
tree153f46e74c8de572a2668400b389c420c378c325 /modules/luci-base
parent3a24c2dbaa9b781504bb2847153e2514bcbe717e (diff)
luci-base: luci.js: add Object.assign polyfill
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/luci.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js
index 4cb8bf4e5d..a481f886c1 100644
--- a/modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/luci.js
@@ -1,4 +1,26 @@
(function(window, document, undefined) {
+ /* Object.assign polyfill for IE */
+ if (typeof Object.assign !== 'function') {
+ Object.defineProperty(Object, 'assign', {
+ value: function assign(target, varArgs) {
+ if (target == null)
+ throw new TypeError('Cannot convert undefined or null to object');
+
+ var to = Object(target);
+
+ for (var index = 1; index < arguments.length; index++)
+ if (arguments[index] != null)
+ for (var nextKey in arguments[index])
+ if (Object.prototype.hasOwnProperty.call(arguments[index], nextKey))
+ to[nextKey] = arguments[index][nextKey];
+
+ return to;
+ },
+ writable: true,
+ configurable: true
+ });
+ }
+
var modalDiv = null,
tooltipDiv = null,
tooltipTimeout = null,