Explicitly serialize output properties in closures
This commit is contained in:
parent
aefe297aa1
commit
93743733fb
|
@ -97,6 +97,10 @@ async function serializeCapturedObject(obj: any): Promise<EnvironmentEntry> {
|
|||
// If this is a promise, we will await it and serialize the result instead.
|
||||
return serializeCapturedObject(await obj);
|
||||
}
|
||||
else if (obj instanceof Property) {
|
||||
// If this is a property, explicitly await its output promise so that we get the raw value.
|
||||
return serializeCapturedObject(await obj.outputPromise);
|
||||
}
|
||||
else if ((obj as Computed<any>).mapValue) {
|
||||
// If this is a computed value -- including a captured fabric resource property -- mapValue it.
|
||||
return await new Promise<EnvironmentEntry>((resolve) => {
|
||||
|
|
|
@ -37,6 +37,7 @@ export function registerResource(
|
|||
|
||||
// Fetch the monitor; if it doesn't exist, bail right away.
|
||||
if (!monitor) {
|
||||
Log.debug(`Not sending RPC to monitor -- it doesn't exist: t=${t}, name=${name}`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue