From c5effd002c29a55d3f0d58901ddb95819b8cfc64 Mon Sep 17 00:00:00 2001 From: Sabine Lim Date: Thu, 18 May 2023 02:58:23 +1000 Subject: [PATCH] Preserve lowercase first char behaviour --- Basalt/plugins/reactive.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Basalt/plugins/reactive.lua b/Basalt/plugins/reactive.lua index c87f4b1..8f583d7 100644 --- a/Basalt/plugins/reactive.lua +++ b/Basalt/plugins/reactive.lua @@ -127,7 +127,8 @@ return { }) objects = basalt.createObjectsFromLayout(layout, props) else - local object = basalt:createObject(node.tag, node.attributes["id"]) + local objectName = node.tag:gsub("^%l", string.upper) + local object = basalt:createObject(objectName, node.attributes["id"]) for attribute, expression in pairs(node.attributes) do if (attribute:sub(1, 2) == "on") then registerFunctionEvent(object, object[attribute], expression .. "()", env)