From 258527750cea3372a932552e0f18cd48e132def5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Sep 2018 18:35:12 -0700 Subject: [PATCH] Slightly more robust. --- code_obj.lua | 2 +- code_obj.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code_obj.lua b/code_obj.lua index 5be92e6..577eaf3 100644 --- a/code_obj.lua +++ b/code_obj.lua @@ -355,7 +355,7 @@ do local _list_1 = self.bits for _index_0 = 1, #_list_1 do local bit = _list_1[_index_0] - if bit.__class == LuaCode then + if not (type(bit) == 'string') then gather_from(bit) end end diff --git a/code_obj.moon b/code_obj.moon index 4e70784..07b7618 100644 --- a/code_obj.moon +++ b/code_obj.moon @@ -207,7 +207,7 @@ class LuaCode extends Code seen[var] = true to_declare[#to_declare+1] = var for bit in *@bits - if bit.__class == LuaCode + unless type(bit) == 'string' gather_from bit gather_from self if #to_declare > 0