Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description of what this resolves:
Fixes disappearing menuToggle when hideBackButton is true or swipeBackEnable is false.
Changes proposed in this pull request:
Ionic Version: 3.x
Fixes: #7417
Details:
Use of Array.some() with the given filter function is not achieving the goal stated in the comment, filter returns "true" on self, contradicting the stated purpose. That results in menu getting disabled even in a single menu configuration, while the intent is to find x>1, while Array.some() finds x>=1.
The fix is to either exclude self from consideration (that is a bit convoluted change to either filter function or the Array), or convert
!Array.some()
toArray.filter().length < 2
in proposed fix.Bug in the code was introduced by ff24152
However, the issue seems to be conditional on CSS being applied for "back button" removal, entangling it with hideBackButton and [swipeBackEnabled]="false". Another way to "fix the issue" is remove hideBackButton or [swipeBackEnabled]="false", but it only masks the bug.