Skip to content

The open alternative to Salesforce, designed for AI.

427 B
Raw Blame
import { isDefined } from 'twenty-shared/utils';

import { resolvePolyfillWindow } from '@/polyfills/utils/resolvePolyfillWindow';

export const resolveGlobalScopeInstallTargets = (
  globalScope: Record<string, unknown>,
): Record<string, unknown>[] => {
  const polyfillWindow = resolvePolyfillWindow(globalScope);

  if (isDefined(polyfillWindow)) {
    return [globalScope, polyfillWindow];
  }

  return [globalScope];
};