From 8b4210e66ac0fac41583ed3eb429b088bb64d99b Mon Sep 17 00:00:00 2001 From: Aaron Smith <83140718+centau@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:11:29 +0100 Subject: [PATCH] Add error handling for no properties specified --- src/apply.luau | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apply.luau b/src/apply.luau index d0bccf7..1cc533a 100644 --- a/src/apply.luau +++ b/src/apply.luau @@ -118,6 +118,10 @@ end -- applies table of nested properties to an instance using full vide semantics local function apply(instance: T & Instance, properties: { [unknown]: unknown }): T + if not properties then + throw("no properties given, did you forget to call the constructor returned by create()?") + end + -- queue parent assignment if any for last local parent: unknown = properties.Parent if parent then properties.Parent = nil end