From d7ef4d823a28503a13dcfe1f15c0f48b6dd6cee4 Mon Sep 17 00:00:00 2001 From: jkelaty-rbx <78873527+jkelaty-rbx@users.noreply.github.com> Date: Mon, 10 Oct 2022 12:35:03 -0700 Subject: [PATCH] Move traceback call in connect() (#69) * Move traceback call * Bump tools * Stylua --- foreman.toml | 6 +++--- src/StoreProvider.lua | 4 +--- src/connect.lua | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/foreman.toml b/foreman.toml index e7e309b..0bafa32 100644 --- a/foreman.toml +++ b/foreman.toml @@ -1,4 +1,4 @@ [tools] -rojo = { source = "rojo-rbx/rojo", version = "6.2.0" } -selene = { source = "Kampfkarren/selene", version = "0.14" } -stylua = { source = "JohnnyMorganz/StyLua", version = "0.10.1" } +rojo = { source = "rojo-rbx/rojo", version = "=7.2.1" } +selene = { source = "Kampfkarren/selene", version = "=0.21.1" } +stylua = { source = "JohnnyMorganz/StyLua", version = "=0.15.1" } diff --git a/src/StoreProvider.lua b/src/StoreProvider.lua index 613d7ca..9d71671 100644 --- a/src/StoreProvider.lua +++ b/src/StoreProvider.lua @@ -19,9 +19,7 @@ end function StoreProvider:render() return Roact.createElement(StoreContext.Provider, { value = self.store, - }, Roact.oneChild( - self.props[Roact.Children] - )) + }, Roact.oneChild(self.props[Roact.Children])) end return StoreProvider diff --git a/src/connect.lua b/src/connect.lua index 2875e2b..35c8352 100644 --- a/src/connect.lua +++ b/src/connect.lua @@ -48,8 +48,6 @@ end mapDispatchToProps: (dispatch) -> partialProps ]] local function connect(mapStateToPropsOrThunk, mapDispatchToProps) - local connectTrace = debug.traceback() - if mapStateToPropsOrThunk ~= nil then assert(typeof(mapStateToPropsOrThunk) == "function", "mapStateToProps must be a function or nil!") else @@ -68,6 +66,7 @@ local function connect(mapStateToPropsOrThunk, mapDispatchToProps) return function(innerComponent) if innerComponent == nil then + local connectTrace = debug.traceback() local message = formatMessage({ "connect returns a function that must be passed a component.", "Check the connection at:",