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 12, 2024
1 parent 4f7a7fc commit 6b9c271
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 6b9c271

Please sign in to comment.