Fix warnings given by npm start by incorrect var/let.

Apply suggestions from @vitormattos.

Co-authored-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Tthecreator 2021-06-13 16:45:25 +00:00 committed by GitHub
parent bc87d5a573
commit 5cff20f4bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -213,7 +213,7 @@ window.BackendSettings = window.BackendSettings || {};
* Change the state of the Visible/Hidden button
*/
$('.hide-toggle').on('click', function () {
let $input = $(this);
var $input = $(this);
$input.find("div").toggleClass("hidden");
});
@ -238,7 +238,7 @@ window.BackendSettings = window.BackendSettings || {};
* @return the state of the button. True for visible, false for hidden.
*/
function getShowToggleValue($element){
let visiblePartArray = $element.find(".hide-toggle-visible");
var visiblePartArray = $element.find(".hide-toggle-visible");
return !visiblePartArray.hasClass("hidden");
}

View file

@ -73,8 +73,8 @@
* @return '0' when the button shows 'invisible' and '1' when the button shows 'visible'. Will always return '0' on an error.
*/
function getToggleButtonState($element) {
let visiblePartArray = $element.find(".hide-toggle-visible");
let invisiblePartArray = $element.find(".hide-toggle-hidden");
var visiblePartArray = $element.find(".hide-toggle-visible");
var invisiblePartArray = $element.find(".hide-toggle-hidden");
if (!(visiblePartArray.length === 0 || invisiblePartArray.length === 0)) {
if (visiblePartArray.hasClass("hidden")){//our button is currently invisible
return '0';//invisible