From 3e708f9c0bc5a5c6eba8684ebf4b3fd74b94e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Mon, 27 Nov 2017 18:44:05 -0500 Subject: [PATCH] Get rid of `Object.assign` polyfill As far as I know, this is only required for IE at this point, and we have already made changes that removed support of any version of IE. --- .../js/libs/handlebars/ircmessageparser/merge.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/client/js/libs/handlebars/ircmessageparser/merge.js b/client/js/libs/handlebars/ircmessageparser/merge.js index 0e8a4f11..34a7d00f 100644 --- a/client/js/libs/handlebars/ircmessageparser/merge.js +++ b/client/js/libs/handlebars/ircmessageparser/merge.js @@ -3,26 +3,13 @@ const anyIntersection = require("./anyIntersection"); const fill = require("./fill"); -let Object_assign = Object.assign; - -if (typeof Object_assign !== "function") { - Object_assign = function(target) { - Array.prototype.slice.call(arguments, 1).forEach(function(obj) { - Object.keys(obj).forEach(function(key) { - target[key] = obj[key]; - }); - }); - return target; - }; -} - // Merge text part information within a styling fragment function assign(textPart, fragment) { const fragStart = fragment.start; const start = Math.max(fragment.start, textPart.start); const end = Math.min(fragment.end, textPart.end); - return Object_assign({}, fragment, { + return Object.assign({}, fragment, { start: start, end: end, text: fragment.text.slice(start - fragStart, end - fragStart),