Skip to content

Commit

Permalink
Globally-Available Asset Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
nandorojo authored Oct 3, 2024
1 parent 1e39c2d commit cf6ed6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-native-web/src/modules/AssetRegistry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type PackagerAsset = {

const assets: Array<PackagerAsset> = [];

globalThis.__react_native_web_assets = assets

Check failure on line 24 in packages/react-native-web/src/modules/AssetRegistry/index.js

View workflow job for this annotation

GitHub Actions / lint

'globalThis' is not defined

export function registerAsset(asset: PackagerAsset): number {
// `push` returns new array length, so the first asset will
// get id 1 (not 0) to make the value truthy
Expand Down

0 comments on commit cf6ed6c

Please sign in to comment.