浏览代码

Rename variable for clarity (#2801)

XhmikosR 4 年之前
父节点
当前提交
39e9416f8c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      build/js/ControlSidebar.js

+ 2 - 2
build/js/ControlSidebar.js

@@ -135,10 +135,10 @@ class ControlSidebar {
 
     $(window).scroll(() => {
       const $body = $('body')
-      const shouldClose = $body.hasClass(ClassName.CONTROL_SIDEBAR_OPEN) ||
+      const shouldFixHeight = $body.hasClass(ClassName.CONTROL_SIDEBAR_OPEN) ||
           $body.hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)
 
-      if (shouldClose) {
+      if (shouldFixHeight) {
         this._fixScrollHeight()
       }
     })