PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/expo-error-recovery/src

Просмотр файла: ExpoErrorRecovery.web.ts

import { Platform } from 'expo-modules-core';
const LOCAL_STORAGE_KEY = 'EXPO_ERROR_RECOVERY_STORAGE';

function _consumeRecoveryProps(): string | null {
  if (!Platform.isDOMAvailable) return null;
  try {
    const props = localStorage.getItem(LOCAL_STORAGE_KEY);
    localStorage.removeItem(LOCAL_STORAGE_KEY);
    return props;
  } catch (e) {
    // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355
  }
  return null;
}

export default {
  get name(): string {
    return 'ExpoErrorRecovery';
  },

  saveRecoveryProps(props: string): void {
    if (!Platform.isDOMAvailable) return;
    try {
      localStorage.setItem(LOCAL_STORAGE_KEY, props);
    } catch (e) {
      // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355
    }
  },

  recoveredProps: _consumeRecoveryProps(),
};

Выполнить команду


Для локальной разработки. Не используйте в интернете!