Conversation
…ulnerability reported in the react-router package.
|
|
||
| def map_files_to_features(files) | ||
| return @@map_files_to_features if @@map_files_to_features&.keys && @@map_files_to_features.keys.count.positive? | ||
| return @@map_files_to_features if @@map_files_to_features&.any? |
There was a problem hiding this comment.
Nope, but that's why we're using the &. operator here. If the value of @@map_files_to_features is nil then the if condition will evaluate to nil and fail, causing the mapping to be loaded fresh and returned. Otherwise if the value of @@map_files_to_features is NOT nil, then .any? will be evaluated on it and if it's a non-empty hash, then it will be returned as a the cached value, otherwise it will still be loaded fresh and returned. Happy to chat in realtime if this doesn't align with your understanding of the expected behavior. Thanks.
There was a problem hiding this comment.
Uhhh yup, duh at me. Just keeping you on your toes. Total brain-fart; thanks and sorry for the noise.
|
|
||
| def map_files_to_features(files) | ||
| return @@map_files_to_features if @@map_files_to_features&.keys && @@map_files_to_features.keys.count.positive? | ||
| return @@map_files_to_features if @@map_files_to_features&.any? |
There was a problem hiding this comment.
Uhhh yup, duh at me. Just keeping you on your toes. Total brain-fart; thanks and sorry for the noise.

Upgrades the
react-router-dompackage to address security vulnerability reported in thereact-routerpackage.Verified that the documentation site still builds and renders properly.