diff --git a/packages/evasive-transform/src/generate.js b/packages/evasive-transform/src/generate.js index c946f7661c..a00bd2df15 100644 --- a/packages/evasive-transform/src/generate.js +++ b/packages/evasive-transform/src/generate.js @@ -59,7 +59,9 @@ const { default: generator } = /** @type {any} */ (babelGenerate); export const generate = /** @type {GenerateAstWithSourceMap & GenerateAstWithoutSourceMap} */ ( (ast, options) => { - const sourceUrl = options?.sourceUrl; + // TODO Use options?.sourceUrl when resolved: + // https://github.com/Agoric/agoric-sdk/issues/8671 + const sourceUrl = options ? options.sourceUrl : undefined; const result = generator(ast, { sourceFileName: sourceUrl, sourceMaps: Boolean(sourceUrl), diff --git a/packages/evasive-transform/src/index.js b/packages/evasive-transform/src/index.js index 75d02f72f5..da4b05eae0 100644 --- a/packages/evasive-transform/src/index.js +++ b/packages/evasive-transform/src/index.js @@ -35,7 +35,9 @@ import { generate } from './generate.js'; * @public */ export async function evadeCensor(source, options) { - const { sourceMap, sourceUrl, useLocationUnmap, sourceType } = options ?? {}; + // TODO Use options ?? {} when resolved: + // https://github.com/Agoric/agoric-sdk/issues/8671 + const { sourceMap, sourceUrl, useLocationUnmap, sourceType } = options || {}; // See "Chesterton's Fence" await null;