]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/expand-toggle.js
Ran eslint fix on existing codebase
[bookstack] / resources / js / components / expand-toggle.js
index ab4d38ab1df2224270a27aab2f1fca6ae3786e10..76928623d3bb7b70bf3b7ead7bcd2f99b4bc683e 100644 (file)
@@ -1,5 +1,5 @@
-import {slideUp, slideDown} from "../services/animations";
-import {Component} from "./component";
+import {slideUp, slideDown} from '../services/animations';
+import {Component} from './component';
 
 export class ExpandToggle extends Component {
 
@@ -24,8 +24,8 @@ export class ExpandToggle extends Component {
         event.preventDefault();
 
         const matchingElems = document.querySelectorAll(this.targetSelector);
-        for (let match of matchingElems) {
-            this.isOpen ?  this.close(match) : this.open(match);
+        for (const match of matchingElems) {
+            this.isOpen ? this.close(match) : this.open(match);
         }
 
         this.isOpen = !this.isOpen;
@@ -34,8 +34,8 @@ export class ExpandToggle extends Component {
 
     updateSystemAjax(isOpen) {
         window.$http.patch(this.updateEndpoint, {
-            expand: isOpen ? 'true' : 'false'
+            expand: isOpen ? 'true' : 'false',
         });
     }
 
-}
\ No newline at end of file
+}