@rbxts/covenant 1.5.2 → 1.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "main": "src/init.luau",
5
5
  "scripts": {
6
6
  "build": "rbxtsc",
package/src/covenant.luau CHANGED
@@ -322,7 +322,9 @@ do
322
322
  -- ▲ ReadonlyArray.forEach ▲
323
323
  end)
324
324
  end)
325
- self.requestPayloadSend()
325
+ if RunService:IsClient() then
326
+ self.requestPayloadSend()
327
+ end
326
328
  end
327
329
  function Covenant:preventPostStartCall()
328
330
  local _arg0 = not self.started
@@ -17,7 +17,7 @@ export declare class EventMapWithInstance<T extends defined> {
17
17
  set(instance: Instance, key: RBXScriptSignal, value: T): this;
18
18
  delete(instance: Instance, key: RBXScriptSignal): boolean;
19
19
  clear(): void;
20
- deletedInstance(instance: Instance): boolean;
20
+ deleteInstance(instance: Instance): boolean;
21
21
  isEmpty(): boolean;
22
22
  isInstanceEmpty(instance: Instance): boolean;
23
23
  forEach(callbackfn: (value: T, key: RBXScriptSignal) => void): void;
@@ -114,6 +114,9 @@ do
114
114
  local _instance_1 = instance
115
115
  local _eventMap = eventMap
116
116
  _instanceEventMaps_1[_instance_1] = _eventMap
117
+ instance.Destroying:Once(function()
118
+ self:deleteInstance(instance)
119
+ end)
117
120
  end
118
121
  eventMap:set(key, value)
119
122
  return self
@@ -130,7 +133,7 @@ do
130
133
  function EventMapWithInstance:clear()
131
134
  table.clear(self.instanceEventMaps)
132
135
  end
133
- function EventMapWithInstance:deletedInstance(instance)
136
+ function EventMapWithInstance:deleteInstance(instance)
134
137
  local _instanceEventMaps = self.instanceEventMaps
135
138
  local _instance = instance
136
139
  -- ▼ Map.delete ▼
@@ -285,6 +288,9 @@ do
285
288
  local _instance_1 = instance
286
289
  local _eventSet = eventSet
287
290
  _instanceEventSets_1[_instance_1] = _eventSet
291
+ instance.Destroying:Once(function()
292
+ self:deleteInstance(instance)
293
+ end)
288
294
  end
289
295
  eventSet:add(value)
290
296
  return self