]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: somehow 'reply' may not have 'result' (or not yet)
authorshane.xb.qian <shane.qian@foxmail.com>
Mon, 14 Nov 2022 12:25:22 +0000 (20:25 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Mon, 14 Nov 2022 12:25:22 +0000 (20:25 +0800)
autoload/lsp/lspserver.vim

index 8d701f96654f1d6bbe5b64fee87df2c01da7e5cf..cc49c5ec8373e64be1bb9ef647af0321e8432193 100644 (file)
@@ -611,6 +611,10 @@ def AsyncRpcCb(lspserver: dict<any>, method: string, RpcCb: func, chan: channel,
     return
   endif
 
+  if !reply->has_key('result')
+    return
+  endif
+
   RpcCb(lspserver, reply.result)
 enddef