From 0b3d41a83831771704d03158c092b88b3fae848d Mon Sep 17 00:00:00 2001 From: Aleksi Blinnikka Date: Tue, 12 Feb 2019 00:35:13 +0200 Subject: [PATCH] Allow frame creation without clickheal --- kehys/frame.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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", -- 2.39.5