Skip to content

[ImageLoader] Simplify getSize implementation, call failure callback when decoding fails#2750

Open
lkinasiewicz wants to merge 3 commits intonecolas:masterfrom
lkinasiewicz:fix-2749
Open

[ImageLoader] Simplify getSize implementation, call failure callback when decoding fails#2750
lkinasiewicz wants to merge 3 commits intonecolas:masterfrom
lkinasiewicz:fix-2749

Conversation

@lkinasiewicz
Copy link
Copy Markdown

Fixes #2749.

  1. Simplified getSize implementation, so that there is no possibility for infinite timers.
  2. Added handling of decoding failure.
  3. Added unit tests for getSize.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Dec 30, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f8ddd30:

Sandbox Source
react-native-web-examples Configuration

Copy link
Copy Markdown

@CrashBashMD CrashBashMD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it was over complicated before

@quantizor
Copy link
Copy Markdown

I decided to fork this repo to apply the patch and make it available: https://www.npmjs.com/package/react-native-web-fork

The easiest way to use it is probably this package.json override:

{
  "overrides": {
    "react-native-web": "npm:react-native-web-fork"
  }
}

There are other patches applied as well, noted in the package README up top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageLoader.getSize can lead to an infinite interval loop

3 participants