Skip to content

Commit 2f463dc

Browse files
committed
修复:#99 Typing 'setmetatable' function gives error at console
1 parent 0979092 commit 2f463dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/lib/engine/core.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,10 @@ function analysis(code, uri) {
394394

395395
function parseSetmetatable(node, name, location, scope, isLocal) {
396396
const tableNode = node.arguments[0];
397+
if (tableNode === undefined) {
398+
return;
399+
}
400+
397401
let tableSymbol;
398402
if (tableNode.type === 'Identifier') {
399403
let baseTable = moduleType.search(tableNode.name, tableNode.range).value;

0 commit comments

Comments
 (0)