mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
d4dff25292
Summary: For example, I could have a root named `random` and another root named `randomColor`. A child of `randomColor` would **incorrectly** pass as a descendant of `random`. So this commit changes `isDescendant` to do 2 things: - check for exact matches (eg: the path is a root) - call `startsWith` like before, but append `path.sep` to avoid false positives Closes https://github.com/facebook/react-native/pull/9831 Differential Revision: D3864968 fbshipit-source-id: 7fe04913579aa0741840fc925216283304ae3433