diff --git a/packages/near-membrane-base/src/membrane.ts b/packages/near-membrane-base/src/membrane.ts index fd265b1d..a3f34d36 100644 --- a/packages/near-membrane-base/src/membrane.ts +++ b/packages/near-membrane-base/src/membrane.ts @@ -335,7 +335,7 @@ export function createMembraneMarshall(isInShadowRealm?: boolean) { // Safari 12 on iOS 12.1 has a `this` of `undefined` so we // fallback to `self`. // eslint-disable-next-line no-restricted-globals - return this || self; + return this ?? self; }, } as PropertyDescriptor), globalThis); diff --git a/packages/near-membrane-dom/src/browser-realm.ts b/packages/near-membrane-dom/src/browser-realm.ts index 13f850bb..31cdaa41 100644 --- a/packages/near-membrane-dom/src/browser-realm.ts +++ b/packages/near-membrane-dom/src/browser-realm.ts @@ -67,7 +67,7 @@ function createDetachableIframe(): HTMLIFrameElement { // It is impossible to test whether the NodeProtoLastChildGetter branch is // reached in a normal Karma test environment. const parent = - ReflectApply(DocumentProtoBodyGetter, docRef, []) || + ReflectApply(DocumentProtoBodyGetter, docRef, []) ?? /* istanbul ignore next */ ReflectApply(NodeProtoLastChildGetter, docRef, []); const style = ReflectApply(HTMLElementProtoStyleGetter, iframe, []); style.display = 'none'; diff --git a/scripts/rollup/plugins/babel-output.cjs b/scripts/rollup/plugins/babel-output.cjs index da2915f9..bb1c1804 100644 --- a/scripts/rollup/plugins/babel-output.cjs +++ b/scripts/rollup/plugins/babel-output.cjs @@ -31,8 +31,8 @@ module.exports = { // https://github.com/babel/babel/blob/v7.15.6/packages/babel-core/src/config/files/configuration.ts#L24 const configPath = // prettier-ignore - options.configFile || - (await globby([`${path.resolve('.babelrc')}{,.js,.cjs,.mjs,.json}`]))[0] || + options.configFile ?? + (await globby([`${path.resolve('.babelrc')}{,.js,.cjs,.mjs,.json}`]))[0] ?? (await globby([`${path.resolve(rootPath, 'babel.config')}{.js,.cjs,.mjs,.json}`]))[0]; const config = path.extname(configPath) === '.json'