From 399663176ce6c22e4a0153a34504d239a679e857 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 28 Dec 2018 17:34:47 +0200 Subject: [PATCH] app.js: Remove redundant function. --- app.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app.js b/app.js index 5e5b0d8..8ef0faf 100644 --- a/app.js +++ b/app.js @@ -20,10 +20,6 @@ var HTML_MIME_TYPES = [ // and JSFiddle inlines the contents of the CSS and JS panes of its editor into the resulting HTML. var MAX_HTML_SIZE = '1MB'; -function shallowClone(obj) { - return Object.assign({}, obj); -} - function disabledIdsFor(req) { var rawIds = req.query.disable; if (!rawIds) { @@ -41,7 +37,7 @@ function lintsFor(html, disabledIds) { lint.elements = undefined; elements.each(function (_, element) { if (element.startLocation) { - var locatedLint = shallowClone(lint); + var locatedLint = Object.assign({}, lint); locatedLint.location = element.startLocation; lints.push(locatedLint); output = true;