Skip to content

Commit

Permalink
Update Main.lua
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
LFS6502 authored Jul 28, 2019
1 parent 068605d commit c9149bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Trello/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ local Constructors = script.Parent.Constructors
local ConList = {
Board = require(Constructors.Board),
List = require(Constructors.List),
Card = require(Constructors.Card),
Label = require(Constructors.Label)
Card = require(Constructors.Card)
}

print("Trello API - Version "..VERSION)
Expand Down Expand Up @@ -44,11 +43,11 @@ script.Parent.auth:Destroy()
Trello.new = function(className, name, parent)
if ConList[className] then
if className == "Board" then
return (ConList.Board.new({name = name}, ConList["Board"], ConList["List"], ConList["Card"], ConList["Label"]))
return (ConList.Board.new({name = name}, ConList["Board"], ConList["List"], ConList["Card"]))
elseif className == "List" then
if parent then
if parent:ClassName() == "Board" then
return (ConList.List.new({name = name, idBoard = parent:GetId()}, ConList["Board"], ConList["List"], ConList["Card"], ConList["Label"]))
return (ConList.List.new({name = name, idBoard = parent:GetId()}, ConList["Board"], ConList["List"], ConList["Card"]))
else
error("List - argument #3 is not a board.", 0)
end
Expand All @@ -58,7 +57,7 @@ Trello.new = function(className, name, parent)
else
if parent then
if parent:ClassName() == "List" then
return (ConList.Card.new({name = name, idCard = parent:GetId()}, ConList["Board"], ConList["List"], ConList["Card"], ConList["Label"]))
return (ConList.Card.new({name = name, idCard = parent:GetId()}, ConList["Board"], ConList["List"], ConList["Card"]))
else
error("Card - argument #3 is not a card.", 0)
end
Expand Down

0 comments on commit c9149bc

Please sign in to comment.