Skip to content

Commit f78be72

Browse files
committed
fix #699 check nil
1 parent a67ee53 commit f78be72

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changelog.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## 2.4.1
44
* `FIX` broken with single file
5-
* `CHG` [#698](https://github.com/sumneko/lua-language-server/issues/698)
5+
* `FIX` [#698](https://github.com/sumneko/lua-language-server/issues/698)
6+
* `FIX` [#699](https://github.com/sumneko/lua-language-server/issues/699)
67

78
## 2.4.0
89
`2021-10-1`

script/parser/newparser.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,9 @@ return function (lua, mode, version, options)
36453645
elseif mode == 'Action' then
36463646
State.ast = parseAction()
36473647
end
3648-
State.ast.state = State
3648+
if State.ast then
3649+
State.ast.state = State
3650+
end
36493651

36503652
return State
36513653
end

0 commit comments

Comments
 (0)