You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It look like the intent of the last line is: return isItemExpandable?(item.value, outlineView) ?? (item.children.isEmpty == false)
However, ?? binds tighter than ==, so this line is actually: return (isItemExpandable?(item.value, outlineView) ?? item.children.isEmpty) == false
which inverts the sense of isItemExpandable. Proposed fix: return isItemExpandable?(item.value, outlineView) ?? !item.children.isEmpty
or altnernatively: return isItemExpandable?(item.value, outlineView) ?? (item.children.isEmpty == false)
Workaround: user-supplied isItemExpandable must return false to make item expandable.
I can supply a PR if needed, but this is an easy fix.
The text was updated successfully, but these errors were encountered:
In NSOutlineView+Changeset.swift:
It look like the intent of the last line is:
return isItemExpandable?(item.value, outlineView) ?? (item.children.isEmpty == false)
However, ?? binds tighter than ==, so this line is actually:
return (isItemExpandable?(item.value, outlineView) ?? item.children.isEmpty) == false
which inverts the sense of isItemExpandable. Proposed fix:
return isItemExpandable?(item.value, outlineView) ?? !item.children.isEmpty
or altnernatively:
return isItemExpandable?(item.value, outlineView) ?? (item.children.isEmpty == false)
Workaround: user-supplied isItemExpandable must return
false
to make item expandable.I can supply a PR if needed, but this is an easy fix.
The text was updated successfully, but these errors were encountered: