@elliemae/pui-app-sdk 5.21.1 → 5.21.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.
@@ -160,8 +160,13 @@ function Throttle(delay = 300) {
160
160
  }
161
161
  function AsyncSingleExecution(_target, _propertyKey, descriptor) {
162
162
  const originalMethod = descriptor.value;
163
- const promiseMap = /* @__PURE__ */ new Map();
163
+ const instanceMap = /* @__PURE__ */ new WeakMap();
164
164
  descriptor.value = function(...args) {
165
+ const instance = this;
166
+ if (!instanceMap.has(instance)) {
167
+ instanceMap.set(instance, /* @__PURE__ */ new Map());
168
+ }
169
+ const promiseMap = instanceMap.get(instance);
165
170
  const key = JSON.stringify(args);
166
171
  if (promiseMap.has(key)) {
167
172
  return promiseMap.get(key);
@@ -129,8 +129,13 @@ function Throttle(delay = 300) {
129
129
  }
130
130
  function AsyncSingleExecution(_target, _propertyKey, descriptor) {
131
131
  const originalMethod = descriptor.value;
132
- const promiseMap = /* @__PURE__ */ new Map();
132
+ const instanceMap = /* @__PURE__ */ new WeakMap();
133
133
  descriptor.value = function(...args) {
134
+ const instance = this;
135
+ if (!instanceMap.has(instance)) {
136
+ instanceMap.set(instance, /* @__PURE__ */ new Map());
137
+ }
138
+ const promiseMap = instanceMap.get(instance);
134
139
  const key = JSON.stringify(args);
135
140
  if (promiseMap.has(key)) {
136
141
  return promiseMap.get(key);