Skip to content

Commit 23961a8

Browse files
authored
Merge pull request #464 from codedownio/fix-registeroptions
Fix parsing of registerOptions
2 parents 34f545d + 5159679 commit 23961a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp-types/src/Language/LSP/Types/Registration.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ instance ToJSON SomeRegistration where
138138
instance FromJSON SomeRegistration where
139139
parseJSON = withObject "Registration" $ \o -> do
140140
SomeClientMethod m <- o .: "method"
141-
r <- Registration <$> o .: "id" <*> pure m <*> regHelper m (o .: "registerOptions")
141+
r <- Registration <$> o .: "id" <*> pure m <*> regHelper m (o .:? "registerOptions")
142142
pure (SomeRegistration r)
143143

144144
instance Eq SomeRegistration where

0 commit comments

Comments
 (0)