@openfin/fdc3-api 45.100.40 → 45.100.41
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/out/fdc3-api.js +2 -13
- package/package.json +1 -1
package/out/fdc3-api.js
CHANGED
|
@@ -412,7 +412,6 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
|
|
|
412
412
|
// Generate an ID to make a session context group with. We will pass that ID to the Broker.
|
|
413
413
|
// The broker will then setContext on that session context group later with our Intent Result,
|
|
414
414
|
const guid = (0, utils_1.generateId)(); // TODO make this undefined in web
|
|
415
|
-
let isPromiseSettled = false;
|
|
416
415
|
// Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
|
|
417
416
|
const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
|
|
418
417
|
const intentObj = intent ? { name: intent, context, metadata } : { ...context, metadata };
|
|
@@ -428,21 +427,11 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
|
|
|
428
427
|
reject(new Error('getResult is not supported in this environment'));
|
|
429
428
|
});
|
|
430
429
|
});
|
|
431
|
-
getResultPromise
|
|
432
|
-
.then(() => {
|
|
433
|
-
isPromiseSettled = true;
|
|
434
|
-
})
|
|
435
|
-
.catch(() => {
|
|
436
|
-
isPromiseSettled = true;
|
|
437
|
-
});
|
|
438
430
|
// Set up the getResult call.
|
|
439
431
|
const getResult = async () => {
|
|
440
|
-
// All this mumbo jumbo is needed to make sure that getResult resolves correctly and conforms to the FDC3 spec.
|
|
441
|
-
if (!isPromiseSettled) {
|
|
442
|
-
return undefined;
|
|
443
|
-
}
|
|
444
432
|
let intentResult = await getResultPromise;
|
|
445
|
-
|
|
433
|
+
// void / no payload, or web path where subscribe resolves undefined (see getResultPromise above)
|
|
434
|
+
if (intentResult == null) {
|
|
446
435
|
return undefined;
|
|
447
436
|
}
|
|
448
437
|
if (typeof intentResult !== 'object') {
|