Skip to content

Commit

Permalink
Move traceback call in connect() (#69)
Browse files Browse the repository at this point in the history
* Move traceback call

* Bump tools

* Stylua
  • Loading branch information
jkelaty-rbx authored Oct 10, 2022
1 parent 60ce019 commit d7ef4d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions foreman.toml
Original file line number Diff line number Diff line change
@@ -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" }
4 changes: 1 addition & 3 deletions src/StoreProvider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions src/connect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:",
Expand Down

0 comments on commit d7ef4d8

Please sign in to comment.