-
Notifications
You must be signed in to change notification settings - Fork 60
Fix trying to open the sidebar when not available #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix trying to open the sidebar when not available #421
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Unfortunately that fails if I can rebase this pull request on latest master to fix it. Which condition do you prefer, |
|
Yours is fine :) |
When OCA.Files is not defined the sidebar is not available, but in that case it is not possible to check against OCA.Files.Sidebar. When the sidebar is not available "sidebarFile" is null, and when the sidebar is available but there is no file it is an empty string, so it is enough to check if "sidebarFile" has a value or not in order to open the sidebar or not. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
25aecb3 to
f3d1fd0
Compare
|
/backport to stable18 |
|
The backport to stable18 failed. Please do this backport manually. |
|
backport in #428 |
When the sidebar is not available
sidebarFileis null. As the condition strictly checked for an empty string it passed when not empty but also when null, so the sidebar was tried to be opened even if it was not available.Another possible fix would have been to change the computed property to return an empty string too if the sidebar is not available. However I changed the condition instead as I thought that it would be better to be able to differentiate between those states (even if it is currently not needed). Having said that, if you prefer that approach just tell me and I will change it ;-)