File tree Expand file tree Collapse file tree
apps/viewer/apps/viewer/src/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,7 +180,15 @@ export default {
180180 isEndOfList () {
181181 return this .currentIndex === this .fileList .length - 1
182182 },
183- // Current opened file in the sidebar if available
183+ /**
184+ * Returns the path to the current opened file in the sidebar.
185+ *
186+ * If the sidebar is available but closed an empty string is returned.
187+ * If the sidebar is not available null is returned.
188+ *
189+ * @returns {string|null} the path to the current opened file in the
190+ * sidebar, if any.
191+ */
184192 sidebarFile () {
185193 return this .Sidebar && this .Sidebar .file
186194 },
@@ -401,7 +409,7 @@ export default {
401409 * Show sidebar if available and a file is already opened
402410 */
403411 changeSidebar () {
404- if (OCA . Files . Sidebar && this .sidebarFile !== ' ' ) {
412+ if (this .sidebarFile ) {
405413 this .showSidebar ()
406414 }
407415 },
You can’t perform that action at this time.
0 commit comments