We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a5d9d commit df98a7dCopy full SHA for df98a7d
1 file changed
src/views/Settings/PolicyWorkbench/settings/identify-methods/model.ts
@@ -21,20 +21,21 @@ export type IdentifyMethodPolicyEntry = {
21
}
22
23
export function normalizeIdentifyMethodsPolicy(value: EffectivePolicyValue): IdentifyMethodPolicyEntry[] {
24
+ let entries: unknown = value
25
if (typeof value === 'string') {
26
const decoded = safeJsonParse(value)
27
if (Array.isArray(decoded)) {
- value = decoded as unknown as EffectivePolicyValue
28
+ entries = decoded
29
30
31
- if (!Array.isArray(value)) {
32
+ if (!Array.isArray(entries)) {
33
return []
34
35
36
const normalized: IdentifyMethodPolicyEntry[] = []
37
- for (const rawEntry of value) {
38
+ for (const rawEntry of entries) {
39
if (!rawEntry || typeof rawEntry !== 'object') {
40
continue
41
0 commit comments