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 1874101 commit 9d7573cCopy full SHA for 9d7573c
analysis/src/FindFiles.ml
@@ -95,10 +95,12 @@ let nameSpaceToName n =
95
96
let getNamespace config =
97
let ns = config |> Json.get "namespace" in
98
- let isNamespaced = ns |> bind Json.bool |> Option.value ~default:false in
+ let fromString = ns |> bind Json.string in
99
+ let isNamespaced =
100
+ ns |> bind Json.bool |> Option.value ~default:(fromString |> Option.is_some)
101
+ in
102
let either x y = if x = None then y else x in
103
if isNamespaced then
- let fromString = ns |> bind Json.string in
104
let fromName = config |> Json.get "name" |> bind Json.string in
105
either fromString fromName |> Option.map nameSpaceToName
106
else None
0 commit comments