@quenty/rx 7.3.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [7.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rx@7.3.0...@quenty/rx@7.4.0) (2023-01-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Paranoid disconnect take() calls ([108c19e](https://github.com/Quenty/NevermoreEngine/commit/108c19edd63ee41bec1326750a19e770184df641))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rx@7.2.1...@quenty/rx@7.3.0) (2023-01-01)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/rx",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "Quenty's reactive library for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "b2393f15774341318803f9bdd1377a4aa9d2fb0e"
43
+ "gitHead": "db2db00ab4e24a3eab0449b77a00bee6d91f2755"
44
44
  }
package/src/Shared/Rx.lua CHANGED
@@ -1374,7 +1374,7 @@ function Rx.take(number)
1374
1374
  local taken = 0
1375
1375
  local maid = Maid.new()
1376
1376
 
1377
- maid:GiveTask(source:Subscribe(function(...)
1377
+ maid._sub = source:Subscribe(function(...)
1378
1378
  if taken >= number then
1379
1379
  warn("[Rx.take] - Still getting values past subscription")
1380
1380
  return
@@ -1385,8 +1385,11 @@ function Rx.take(number)
1385
1385
 
1386
1386
  if taken >= number then
1387
1387
  sub:Complete()
1388
+
1389
+ -- Paranoid disconnect, even though our parent should also disconnect
1390
+ maid._sub = nil
1388
1391
  end
1389
- end, sub:GetFailComplete()))
1392
+ end, sub:GetFailComplete())
1390
1393
 
1391
1394
  return maid
1392
1395
  end)