Skip to content

Commit

Permalink
fixup! move console ref around because XS error
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Nov 10, 2024
1 parent 6d139d7 commit fac3fae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ses/src/intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ function sampleGlobals(globalObject, newPropertyNames) {
}

/**
* @param {Reporter} reporter
* @param {Reporter} [reporter] defaults to `console`
*/
export const makeIntrinsicsCollector = reporter => {
export const makeIntrinsicsCollector = (reporter = console) => {
/** @type {Record<any, any>} */
const intrinsics = create(null);
let pseudoNatives;
Expand Down Expand Up @@ -180,10 +180,10 @@ export const makeIntrinsicsCollector = reporter => {
* *original* unsafe (feral, untamed) bindings of these global variables.
*
* @param {object} globalObject
* @param {Reporter} [reporter] defaults to `console`
*/
export const getGlobalIntrinsics = (globalObject, reporter = console) => {
const { addIntrinsics, finalIntrinsics } = makeIntrinsicsCollector(reporter);
export const getGlobalIntrinsics = globalObject => {
// TODO pass a proper reporter to `makeIntrinsicsCollector`
const { addIntrinsics, finalIntrinsics } = makeIntrinsicsCollector();

addIntrinsics(sampleGlobals(globalObject, sharedGlobalPropertyNames));

Expand Down

0 comments on commit fac3fae

Please sign in to comment.