]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/chapter-contents.js
Locales: Removed a lot of existing locale handling
[bookstack] / resources / js / components / chapter-contents.js
index c824d0f78b0b7fad13fcb16f84453746be6f1c7c..7c6480a1af0b8a6c176e1f6dd8beca9ada8a5033 100644 (file)
@@ -1,9 +1,7 @@
-import {slideUp, slideDown} from "../services/animations";
+import {slideUp, slideDown} from '../services/animations';
+import {Component} from './component';
 
-/**
- * @extends {Component}
- */
-class ChapterContents {
+export class ChapterContents extends Component {
 
     setup() {
         this.list = this.$refs.list;
@@ -29,9 +27,11 @@ class ChapterContents {
 
     click(event) {
         event.preventDefault();
-        this.isOpen ?  this.close() : this.open();
+        if (this.isOpen) {
+            this.close();
+        } else {
+            this.open();
+        }
     }
 
 }
-
-export default ChapterContents;