From a34ed266d71026a2d1be6b9cf171b526d9494296 Mon Sep 17 00:00:00 2001 From: Jakob Buverud Date: Wed, 7 Mar 2018 14:51:31 +0100 Subject: [PATCH] Fixed bug in ignoreError function causing map/solar layers not to render (#1183) --- web/src/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/main.js b/web/src/main.js index 3dc0a18893..4fec8ed9b3 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -648,13 +648,13 @@ function handleConnectionReturnCode(err) { } const ignoreError = func => - () => { - const callback = arguments[arguments.length - 1]; - arguments[arguments.length - 1] = (err, obj) => { + (...args) => { + const callback = args[args.length - 1]; + args[args.length - 1] = (err, obj) => { if (err) { return callback(null, null); } return callback(null, obj); }; - func.apply(this, arguments); + func.apply(this, args); }; function fetch(showLoading, callback) {