diff --git a/packages/rn/src/client.ts b/packages/rn/src/client.ts index 064a05b..b4319e4 100644 --- a/packages/rn/src/client.ts +++ b/packages/rn/src/client.ts @@ -61,6 +61,7 @@ export class LogtoClient extends StandardLogtoClient { case 'sign-out': { break; } + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- just in case default: { throw new LogtoNativeClientError('navigation_purpose_not_supported'); } diff --git a/packages/rn/src/polyfill.ts b/packages/rn/src/polyfill.ts index 6b6f229..0f56b7f 100644 --- a/packages/rn/src/polyfill.ts +++ b/packages/rn/src/polyfill.ts @@ -7,11 +7,7 @@ /* eslint-disable @silverhand/fp/no-mutation, @typescript-eslint/no-unnecessary-condition */ import { btoaPolyfill, atobPolyfill } from 'js-base64'; -if (!global.btoa) { - global.btoa = btoaPolyfill; -} +global.btoa ||= btoaPolyfill; -if (!global.atob) { - global.atob = atobPolyfill; -} +global.atob ||= atobPolyfill; /* eslint-enable @silverhand/fp/no-mutation, @typescript-eslint/no-unnecessary-condition */