Skip to content

Commit c3e9ad5

Browse files
author
Arpith Siromoney
committed
Replace spread operator with Object.assign for ES2015 compatibility
The babel-preset-es2015 used by this project doesn't support object spread syntax, which was added in ES2018. Using Object.assign() instead maintains the same functionality while being compatible with the existing Babel configuration.
1 parent 1fe23fc commit c3e9ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/feedUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function buildArticleKey(hash) {
5959
* @returns {Object} Article with hash, score, and feedurl added
6060
*/
6161
function processArticle(article, feedURI, hashFn, scoreFn) {
62-
const processed = { ...article };
62+
const processed = Object.assign({}, article);
6363
processed.hash = hashFn(article);
6464
processed.score = scoreFn(article);
6565
processed.feedurl = feedURI;

0 commit comments

Comments
 (0)