@rbxts/covenant 3.2.0 → 3.2.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/covenant.luau +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "main": "src/init.luau",
5
5
  "scripts": {
6
6
  "build": "rbxtsc",
package/src/covenant.luau CHANGED
@@ -478,7 +478,20 @@ do
478
478
  -- ▼ ReadonlyArray.forEach ▼
479
479
  local _callback = function(c)
480
480
  if self:worldHas(c) then
481
- self:worldSet(entity, c, nil)
481
+ local lastState = self:worldGet(entity, c)
482
+ local _stringifiedComponentSubscribers = self.stringifiedComponentSubscribers
483
+ local _arg0 = tostring(c)
484
+ local _result = _stringifiedComponentSubscribers[_arg0]
485
+ if _result ~= nil then
486
+ -- ▼ ReadonlySet.forEach ▼
487
+ local _callback_1 = function(subscriber)
488
+ subscriber(entity, nil, lastState)
489
+ end
490
+ for _v in _result do
491
+ _callback_1(_v, _v, _result)
492
+ end
493
+ -- ▲ ReadonlySet.forEach ▲
494
+ end
482
495
  end
483
496
  end
484
497
  for _k, _v in _exp do