Skip to content

Commit

Permalink
fix(native): prefer local uri for fs (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored Sep 4, 2023
1 parent c228a2a commit 6ced4c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/fiber/src/native/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ export function polyfills() {
let uri = asset.localUri || asset.uri

// Make FS paths web-safe
if (asset.uri.startsWith('file://')) {
const data = await fs.readAsStringAsync(asset.uri, { encoding: fs.EncodingType.Base64 })
if (uri.startsWith('file://')) {
const data = await fs.readAsStringAsync(uri, { encoding: fs.EncodingType.Base64 })
uri = `data:application/octet-stream;base64,${data}`
}

Expand Down

0 comments on commit 6ced4c8

Please sign in to comment.