From 0641a8442d85fc0bf5a53f0628d05500ef764011 Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 1 Jun 2020 21:21:43 +0200 Subject: [PATCH] Fix ESLint errors (#2763) * fix dist/js/demo.js eslint error * fix Layout.js eslint error * remove unnecessary semicolon * remove unexpected token * add missing radix for parseInt in Layout.js --- build/js/Layout.js | 2 +- dist/js/demo.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/js/Layout.js b/build/js/Layout.js index 83fc64a29..109f7cc5d 100644 --- a/build/js/Layout.js +++ b/build/js/Layout.js @@ -131,7 +131,7 @@ const Layout = ($ => { if (this._config.loginRegisterAutoHeight === true) { this.fixLoginRegisterHeight() - } else if (Number.isInteger(this._config.loginRegisterAutoHeight)) { + } else if (this._config.loginRegisterAutoHeight === parseInt(this._config.loginRegisterAutoHeight, 10)) { setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight) } diff --git a/dist/js/demo.js b/dist/js/demo.js index 98ca29971..65fc83fcf 100644 --- a/dist/js/demo.js +++ b/dist/js/demo.js @@ -366,8 +366,9 @@ }) $container.append($logo_variants) var $clear_btn = $('', { - href: 'javascript:void(0)' - }).text('clear').on('click', function () { + href: '#' + }).text('clear').on('click', function (e) { + e.preventDefault() var $logo = $('.brand-link') logo_skins.forEach(function (skin) { $logo.removeClass(skin)