From ab59bd442132681e0e4c11682d712ec2f7c28b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 9 Mar 2021 11:05:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Fix=20a=20deprecation=20wa?= =?UTF-8?q?rning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4030 --- src/octoprint/static/js/app/viewmodels/settings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js index ac9222ce1..ae8074a10 100644 --- a/src/octoprint/static/js/app/viewmodels/settings.js +++ b/src/octoprint/static/js/app/viewmodels/settings.js @@ -770,7 +770,7 @@ $(function () { $(".reload_nonconflicts", self.settingsUpdatedDialog).click(function (e) { e.preventDefault(); self.settingsUpdatedDialog.modal("hide"); - self.requestData(undefined, true); + self.requestData(true); return false; }); @@ -839,14 +839,14 @@ $(function () { self.requestData = function (local) { // handle old parameter format var callback = undefined; - if (arguments.length == 2 || _.isFunction(local)) { + if (arguments.length === 2 || _.isFunction(local)) { var exc = new Error(); log.warn( "The callback parameter of SettingsViewModel.requestData is deprecated, the method now returns a promise, please use that instead. Stacktrace:", exc.stack || exc.stacktrace || "" ); - if (arguments.length == 2) { + if (arguments.length === 2) { callback = arguments[0]; local = arguments[1]; } else {