Skip to content
This repository was archived by the owner on Sep 29, 2022. It is now read-only.

Conversation

@iva2k
Copy link
Owner

@iva2k iva2k commented Jul 31, 2018

Short description of what this resolves:

Fixes disappearing menuToggle when hideBackButton is true or swipeBackEnable is false.

Changes proposed in this pull request:

  • Match the code to the intent described in the comment

Ionic Version: 3.x

Fixes: ionic-team#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() to Array.filter().length < 2 in proposed fix.

Bug in the code was introduced by ionic-team@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants