Skip to content

Commit

Permalink
fix: allow rootUri to be null
Browse files Browse the repository at this point in the history
Fixes #684
  • Loading branch information
felixfbecker committed Nov 13, 2018
1 parent 450116e commit 1da3328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LanguageServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function __construct(ProtocolReader $reader, ProtocolWriter $writer)
*/
public function initialize(ClientCapabilities $capabilities, string $rootPath = null, int $processId = null, string $rootUri = null): Promise
{
if ($rootPath === null) {
if ($rootPath === null && $rootUri !== null) {
$rootPath = uriToPath($rootUri);
}
return coroutine(function () use ($capabilities, $rootPath, $processId) {
Expand Down

0 comments on commit 1da3328

Please sign in to comment.