@elliemae/pui-app-sdk 5.20.1 → 5.20.3

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.
@@ -166,9 +166,9 @@ function AsyncSingleExecution(_target, _propertyKey, descriptor) {
166
166
  return promiseMap.get(key);
167
167
  }
168
168
  const promise = originalMethod.apply(this, args);
169
- if (promise instanceof Promise) {
169
+ if (promise && typeof promise.then === "function") {
170
170
  promiseMap.set(key, promise);
171
- promise.finally(() => {
171
+ promise.catch((e) => e).finally(() => {
172
172
  promiseMap.delete(key);
173
173
  });
174
174
  }
@@ -136,9 +136,9 @@ function AsyncSingleExecution(_target, _propertyKey, descriptor) {
136
136
  return promiseMap.get(key);
137
137
  }
138
138
  const promise = originalMethod.apply(this, args);
139
- if (promise instanceof Promise) {
139
+ if (promise && typeof promise.then === "function") {
140
140
  promiseMap.set(key, promise);
141
- promise.finally(() => {
141
+ promise.catch((e) => e).finally(() => {
142
142
  promiseMap.delete(key);
143
143
  });
144
144
  }