]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/chapter-contents.js
Adapt tests with displayName array
[bookstack] / resources / js / components / chapter-contents.js
index 11e1e8c44d89e14a7c99de62541f14e04610789c..7c6480a1af0b8a6c176e1f6dd8beca9ada8a5033 100644 (file)
@@ -27,7 +27,11 @@ export class ChapterContents extends Component {
 
     click(event) {
         event.preventDefault();
-        this.isOpen ? this.close() : this.open();
+        if (this.isOpen) {
+            this.close();
+        } else {
+            this.open();
+        }
     }
 
 }