From: Aleksi Blinnikka Date: Mon, 11 Feb 2019 22:35:13 +0000 (+0200) Subject: Allow frame creation without clickheal X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/0b3d41a83831771704d03158c092b88b3fae848d?ds=inline Allow frame creation without clickheal --- diff --git a/kehys/frame.lua b/kehys/frame.lua index 252b971..57578c7 100644 --- a/kehys/frame.lua +++ b/kehys/frame.lua @@ -24,14 +24,15 @@ function addon.NewRaidFrame(parent, width, height, unit, attributes, assert(type(width) == "number", "Frame creation missing width!"); assert(type(height) == "number", "Frame creation missing height!"); assert(type(unit) == "string", "Frame creation missing unit!"); - assert(type(attributes) == "table", - "Frame creation missing attributes table!"); assert(type(update) == "function", "Frame creation missing update function!"); assert(type(event) == "function", "Frame creation missing event function!"); assert(type(onshow) == "function", "Frame creation missing onshow function!"); + if type(attributes) ~= "table" then + attributes = {}; + end local f = CreateFrame( "Button",