Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/flower-core/src/FlowerCoreStateSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ export const FlowerCoreStateSelectors: ISelectors = {
if (!rule) return true
if (!rule.rules) return true

const transformSelf = CoreUtils.mapKeysDeepLodash(rule.rules, (v, key) =>
key === '$self' ? id : key
const transformSelf = CoreUtils.mapKeysDeepLodash(
rule.rules,
(v, key) => {
return key.indexOf('$self') > -1 ? key.replace('$self', id) : key
}
)

const [hasError] = MatchRules.rulesMatcher(transformSelf, data, false, {
prefix: name
})
Expand Down