Add setImmediate polyfill to web, fixing dropdown items

zio/stable
Paul Frazee 2023-02-23 16:42:52 -06:00
parent 4182edfd7e
commit b4f2a6979a
5 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@
* @format
*/
import 'platform/polyfills'
import {AppRegistry} from 'react-native'
import App from './src/App'
import {name as appName} from './src/app.json'

View File

@ -1,5 +1,6 @@
// index.web.js
import 'platform/polyfills'
import {AppRegistry} from 'react-native'
import App from './src/App'
import {name as appName} from './src/app.json'

View File

@ -1 +0,0 @@
import '@zxing/text-encoding' // TextEncoder / TextDecoder

View File

@ -1,2 +1 @@
// do nothing
export {}

View File

@ -0,0 +1,4 @@
/// <reference lib="dom" />
// @ts-ignore whatever typescript wants to complain about here, I dont care about -prf
window.setImmediate = (cb: () => void) => setTimeout(cb, 0)