From 7eddd5d42c40959390c052683cf17a3c4cbd5151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 8 Sep 2020 18:54:29 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/vm/getLibrary.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script-beta/vm/getLibrary.lua') diff --git a/script-beta/vm/getLibrary.lua b/script-beta/vm/getLibrary.lua index 4ce02024..8b955c7c 100644 --- a/script-beta/vm/getLibrary.lua +++ b/script-beta/vm/getLibrary.lua @@ -2,6 +2,9 @@ local vm = require 'vm.vm' local guide = require 'parser.guide' local function getLibrary(source) + if source.type == 'library' then + return source + end local defs = vm.getDefs(source) for _, def in ipairs(defs) do if def.type == 'library' then -- cgit v1.2.3