@muze-nl/metro-oidc 0.9.0 → 0.9.1
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/dist/browser.js +14 -1
- package/dist/browser.js.map +2 -2
- package/dist/browser.min.js +3 -3
- package/dist/browser.min.js.map +3 -3
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -278,10 +278,23 @@
|
|
|
278
278
|
function callTracers(tracers, method, ...args) {
|
|
279
279
|
for (const tracer of tracers) {
|
|
280
280
|
if (tracer && typeof tracer[method] == "function") {
|
|
281
|
-
|
|
281
|
+
callTracer(tracer, method, args);
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
+
function callTracer(tracer, method, args) {
|
|
286
|
+
const reportFailure = (error2) => {
|
|
287
|
+
metroConsole.error("metro: tracer." + method + "() failed", error2);
|
|
288
|
+
};
|
|
289
|
+
try {
|
|
290
|
+
const result = tracer[method].call(tracer, ...args);
|
|
291
|
+
if (typeof result?.then == "function") {
|
|
292
|
+
result.then(void 0, reportFailure);
|
|
293
|
+
}
|
|
294
|
+
} catch (error2) {
|
|
295
|
+
reportFailure(error2);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
285
298
|
function isPlainObject(value) {
|
|
286
299
|
return value && typeof value == "object" && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
|
|
287
300
|
}
|