Skip to content

Commit 7ff41bf

Browse files
committed
Fix disconnect error
1 parent 897fbaa commit 7ff41bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Components/ScrollView/ScrollViewNativeComponent.luau

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function ScrollViewNativeComponent:init(props)
4444
y = 0,
4545
})
4646

47-
self.motorStepDisconnect = self.motor:onStep(function(canvasPosition)
47+
self.motorStepConnection = self.motor:onStep(function(canvasPosition)
4848
self._nativeRef.current.CanvasPosition = Vector2.new(canvasPosition.x, canvasPosition.y)
4949
end)
5050

@@ -182,8 +182,8 @@ function ScrollViewNativeComponent:willUnmount()
182182
self.motor:destroy()
183183
end
184184

185-
if self.motorStepDisconnect ~= nil then
186-
self.motorStepDisconnect()
185+
if self.motorStepConnection ~= nil then
186+
self.motorStepConnection:disconnect()
187187
end
188188
end
189189

0 commit comments

Comments
 (0)